[Libguestfs] Migrating file based Xen RHEL5.4 to KVM

Richard W.M. Jones rjones at redhat.com
Tue May 18 07:28:01 UTC 2010


On Mon, May 17, 2010 at 08:13:16PM +0200, Martin Jeppesen wrote:
> > You'll also need to rebuild initrd.
> 
> Doesn't "yum install kernel" do that for me?

No, it's way more complex than that in virt-v2v.  "yum install kernel"
runs /sbin/new-kernel-pkg which (eventually) runs plain mkinitrd.
Unfortunately that just makes an initrd suitable for the current
(ie. pre-migration) hardware.

What you have to do is to run mkinitrd with all the right parameters
(by examining /sbin/new-kernel-pkg by hand) plus some extra parameters
to install the virtio drivers, something like 'mkinitrd --preload=virtio_blk
[...]'.  You need at least the block driver in order to boot, and
after booting you should probably run /sbin/new-kernel-pkg again.

IMHO it would be better for the kernel to ship with a standard initrd
that does everything possible.  dracut was meant to solve these
issues, but in reality it's just a much slower replacement for
mkinitrd.  (Also they should have just used Debian's initramfs.)

Anyway, I'd suggest you use virt-v2v.  It supports file-based guests
just fine.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v




More information about the Libguestfs mailing list