[Libguestfs] [PATCH v4 2/9] v2v: linux: Fix Xen PV-only detection.

Richard W.M. Jones rjones at redhat.com
Wed Apr 12 07:51:12 UTC 2017


On Fri, Apr 07, 2017 at 10:59:33AM +0200, Pino Toscano wrote:
> On Thursday, 6 April 2017 12:04:20 CEST Richard W.M. Jones wrote:
> > Our previous test was wrong.  It tested whether the xennet.ko module
> > exists.  This module was renamed in more recent kernels (to
> > xen-netfront.ko), so it happened to not detect modern kernels as
> > PV-only, but this was by chance.
> 
> Just stumbled upon this bit in v2v/convert_linux.ml:
> 
>     if family = `SUSE_family then (
>       (* Remove xen modules from INITRD_MODULES and DOMU_INITRD_MODULES. *)
>       let variables = ["INITRD_MODULES"; "DOMU_INITRD_MODULES"] in
>       let xen_modules = ["xennet"; "xen-vnif"; "xenblk"; "xen-vbd"] in
> 
> should the list above be updated with the newer names of the Xen
> modules?

TBH I don't think that whole bit of code is necessary at all.  Why
remove Xen modules from the initrd?  They shouldn't affect booting,
and in any case will be removed the next time there is a kernel update
when the guest has moved to the target.

This code came from old virt-v2v ...

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into KVM guests.
http://libguestfs.org/virt-v2v




More information about the Libguestfs mailing list