mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
413ebec0392892ca36b86f416f650090ef8825d3
We want to detect if a Linux kernel is Xen PV only ("PV-only"). Such
a kernel will not boot on KVM, and if a guest has only PV-only
kernels, it will not be able to boot at all on the target.
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.
Modern kernel images can be compiled with Xen PV guest support. The
same image can boot on baremetal, KVM, Xen PV or Xen HVM. Testing if
the xennet (or xen-netfront) module exists is irrelevant to this.
This test, which is based on ideas from Laszlo Ersek and
https://wiki.xen.org/wiki/Xen_Project_Software_Overview#Guest_Types
uses the kernel config test CONFIG_X86_XEN || CONFIG_X86_64_XEN to
determine PV-only kernels.
Note that these CONFIG flags were never upstream, and existed only in
Linux kernels forked by Xen ("XenLinux"). By the time Xen guest
support was added upstream, it was implemented using pvops support, so
a single image could boot on Xen and non-Xen as described above, and
these flags were no longer used.
Updates commit 7eb219d193.
Thanks: Laszlo Ersek.
…
…
Libguestfs is tools and a library for accessing and modifying guest disk images. For more information see the home page: http://libguestfs.org/ For discussion, development, patches, etc. please use the mailing list: http://www.redhat.com/mailman/listinfo/libguestfs To find out how to build libguestfs from source, read: docs/guestfs-building.pod http://libguestfs.org/guestfs-building.1.html man docs/guestfs-building.1 Copyright (C) 2009-2017 Red Hat Inc. The library is distributed under the LGPLv2+. The programs are distributed under the GPLv2+. Please see the files COPYING and COPYING.LIB for full license information. The examples are under a very liberal license.
Description
Languages
C
42.7%
OCaml
35.5%
Shell
7.1%
Makefile
4%
Perl
2.6%
Other
8%