[Libguestfs] [PATCH p2v 1/2] make-disk: Don't upgrade the kernel to avoid kernel command line bug

Richard W.M. Jones rjones at redhat.com
Wed Mar 23 18:28:07 UTC 2022


There is some bug in recent Fedora which prevents the kernel from
being upgraded correctly from libguestfs.  As an example of what
happens and how to reproduce it see:

https://bugzilla.redhat.com/show_bug.cgi?id=1945835#c24

This problem causes the kernel command line to be messed up (including
bits of the libguestfs appliance /proc/cmdline), and this prevents
virt-p2v from finding the root filesystem.

This patch is just a workaround for this bug.  By preventing the
kernel* package from being upgraded we continue to use the working
kernel from the template.  Userspace packages in the template get
updated as before.
---
 virt-p2v-make-disk.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/virt-p2v-make-disk.in b/virt-p2v-make-disk.in
index 132211d..ac477eb 100644
--- a/virt-p2v-make-disk.in
+++ b/virt-p2v-make-disk.in
@@ -243,7 +243,7 @@ virt-builder "$osversion"                                       \
     $preinstall_args                                            \
     --hostname p2v.local                                        \
     --run-command 'hostname p2v.local'                          \
-    --update                                                    \
+    --run-command 'dnf -y update --exclude=kernel\*'            \
     --install "$install"                                        \
     --root-password password:p2v                                \
     --upload "$datadir"/issue:/etc/issue                        \
-- 
2.35.1



More information about the Libguestfs mailing list