[PATCH p2v 1/2] make-disk: Don't upgrade the kernel to avoid kernel command line bug
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
With the general growth of Fedora, especially use of zram, it seems prudent to increase the amount of memory used in this test. Physical machines that we are emulating would have a lot more RAM than 1G. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index a5742b0..678eff4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -264,7 +264,7 @@ run-virt-p2v-in-a-vm: virt-p2v.img $(PHYSICAL_MACHINE) $(shell guestfish get-hv) \ -M pc,accel=kvm:tcg \ -cpu host \ - -m 1024 \ + -m 2048 \ -drive id=hd0,file=$(PHYSICAL_MACHINE),format=raw,if=ide \ -device piix3-usb-uhci \ -drive id=usb0,file=$<,format=raw,snapshot=on,if=none \ -- 2.35.1
On 03/23/22 19:28, Richard W.M. Jones wrote:
With the general growth of Fedora, especially use of zram, it seems prudent to increase the amount of memory used in this test. Physical machines that we are emulating would have a lot more RAM than 1G. --- Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am index a5742b0..678eff4 100644 --- a/Makefile.am +++ b/Makefile.am @@ -264,7 +264,7 @@ run-virt-p2v-in-a-vm: virt-p2v.img $(PHYSICAL_MACHINE) $(shell guestfish get-hv) \ -M pc,accel=kvm:tcg \ -cpu host \ - -m 1024 \ + -m 2048 \ -drive id=hd0,file=$(PHYSICAL_MACHINE),format=raw,if=ide \ -device piix3-usb-uhci \ -drive id=usb0,file=$<,format=raw,snapshot=on,if=none \
Acked-by: Laszlo Ersek <lersek@redhat.com>
Thanks - pushed these as commits 764abefaa & 07a346ceb. BTW the earlier bug with version detection will mean that RHEL 7 virt-p2v ISO will definitely not be able to talk to RHEL 9.1 virt-v2v :-( Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com nbdkit - Flexible, fast NBD server with plugins https://gitlab.com/nbdkit/nbdkit
On 03/23/22 19:28, Richard W.M. Jones wrote:
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 \
Awesome, thank you! Acked-by: Laszlo Ersek <lersek@redhat.com>
participants (2)
-
Laszlo Ersek -
Richard W.M. Jones