Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Descriptionkuwei@redhat.com
2017-01-11 08:57:25 UTC
Description of problem:
Virt-v2v will use the latest kernel instead of the default kernel.
Version-Release number of selected component (if applicable):
virt-v2v-1.32.7-3.el7_3.2.x86_64
libvirt-2.0.0-10.el7_3.4.x86_64
libguestfs-1.32.7-3.el7_3.2.x86_64
How reproducible:
100%
Steps to Reproduce:
1.Prepare a rhel6.6 guest which has more than one kernel.
2:Before convert check the default kernel.
#uname -a
Linux localhost.localdomain 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux
#cat /boot/grub/grub.conf
#boot=/dev/vda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.32-680.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-680.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-680.el6.x86_64.img
title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.el6.x86_64.img
3:Using virt-v2v convert the guest from kvm to rhv4.0.
[root@localhost yum.repos.d]# virt-v2v rhel6.6-two-kernel -o rhev -os 10.73.131.93:/home/nfs_export
[ 0.0] Opening the source -i libvirt rhel6.6-two-kernel
[ 0.0] Creating an overlay to protect the source from being modified
[ 0.6] Initializing the target -o rhev -os 10.73.131.93:/home/nfs_export
[ 1.0] Opening the overlay
[ 7.4] Inspecting the overlay
[ 24.1] Checking for sufficient free disk space in the guest
[ 24.1] Estimating space required on target for each disk
[ 24.1] Converting Red Hat Enterprise Linux Server release 6.6 (Santiago) to run on KVM
virt-v2v: warning: /files/boot/grub/device.map/hd0 references unknown
device "vda". You may have to fix this entry manually after conversion.
virt-v2v: warning: /files/etc/sysconfig/grub/boot references unknown device
"vda". You may have to fix this entry manually after conversion.
virt-v2v: This guest has virtio drivers installed.
[ 156.9] Mapping filesystem data to avoid copying unused and blank areas
[ 157.4] Closing the overlay
[ 158.3] Checking if the guest needs BIOS or UEFI to boot
[ 158.3] Assigning disks to buses
[ 158.3] Copying disk 1/1 to /tmp/v2v.R9CvD0/39dd1fc0-8a72-42f7-bc49-0ad67388f665/images/094280d5-2c86-4bb0-a69c-d462c09ca757/9d63632e-0177-49ee-ad5b-02d746497afd (raw)
(100.00/100%)
[ 200.8] Creating output metadata
[ 200.9] Finishing off
4.After conversion ,power on the guest to check default kernel.
#uname -a
Linux localhost.localdomain 2.6.32-680.el6.x86_64 #1 SMP Tue Dec 13 19:38:29 EST 2016 x86_64 x86_64 x86_64 GNU/Linux
#cat /boot/grub/grub.conf
#boot=/dev/vda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.32-680.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-680.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-680.el6.x86_64.img
title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-504.el6.x86_64.img
Actual results:
As above description
Expected results:
virt-v2v should use the default kernel when convert a guest.
Additional info:
1:With below builds virt-v2v also will use the latest kernel instead of the default kernel.
virt-v2v-1.32.7-3.el7.x86_64
libguestfs-1.32.7-3.el7.x86_64
libvirt-2.0.0-10.el7.x86_64
Yup, I can confirm this.
It looks like this was changed in upstream commit 16e817456cf7e5162ba053c92f1a4df24a4160d5:
- before, the list of kernels was iterated from the first kernel to the last, returning the first good kernel (i.e. not for the old hypervisor, and that supports virtio when requested); this matched what the old virt-v2v did (lib/Sys/VirtConvert/Converter/Linux.pm, _configure_kernel function)
- after, the list of kernel is sorted first by virtio, then by kernel version, and then by non-debug flavour, picking the resulting first kernel
in both cases, the starting list of kernels contains all the valid kernels available in the bootloader, with the one marked as default as first element.
It is thus clear than then sorting of kernels done now basically ignores whatever is the default kernel: any kernel with the same features (with virtio, non-debug) but with the higher version will be used instead.
Possible options are:
1) decide the best kernel must be used anyway, no matter the previous default
2) keep the same default, if that kernels has the features needed (i.e. with virtio, non-debug, non-xen)
3) something else I'm currently missing
Comment 4Richard W.M. Jones
2017-01-16 07:11:01 UTC
I agree this does appear to be a silent change in the old virt-v2v
behaviour.
However what I'm missing here: Does changing to the latest
kernel cause any demonstrable problem? The bug report just
says the new default kernel is different, but doesn't say
(AFAICT) that this caused a problem.
Comment 6Richard W.M. Jones
2017-02-16 17:00:49 UTC
I don't believe this is a real bug until it causes some problems,
so I am closing it for now. Please reopen if there is a real
problem identified.
Description of problem: Virt-v2v will use the latest kernel instead of the default kernel. Version-Release number of selected component (if applicable): virt-v2v-1.32.7-3.el7_3.2.x86_64 libvirt-2.0.0-10.el7_3.4.x86_64 libguestfs-1.32.7-3.el7_3.2.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a rhel6.6 guest which has more than one kernel. 2:Before convert check the default kernel. #uname -a Linux localhost.localdomain 2.6.32-504.el6.x86_64 #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64 x86_64 x86_64 GNU/Linux #cat /boot/grub/grub.conf #boot=/dev/vda default=1 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux Server (2.6.32-680.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-680.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-680.el6.x86_64.img title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-504.el6.x86_64.img 3:Using virt-v2v convert the guest from kvm to rhv4.0. [root@localhost yum.repos.d]# virt-v2v rhel6.6-two-kernel -o rhev -os 10.73.131.93:/home/nfs_export [ 0.0] Opening the source -i libvirt rhel6.6-two-kernel [ 0.0] Creating an overlay to protect the source from being modified [ 0.6] Initializing the target -o rhev -os 10.73.131.93:/home/nfs_export [ 1.0] Opening the overlay [ 7.4] Inspecting the overlay [ 24.1] Checking for sufficient free disk space in the guest [ 24.1] Estimating space required on target for each disk [ 24.1] Converting Red Hat Enterprise Linux Server release 6.6 (Santiago) to run on KVM virt-v2v: warning: /files/boot/grub/device.map/hd0 references unknown device "vda". You may have to fix this entry manually after conversion. virt-v2v: warning: /files/etc/sysconfig/grub/boot references unknown device "vda". You may have to fix this entry manually after conversion. virt-v2v: This guest has virtio drivers installed. [ 156.9] Mapping filesystem data to avoid copying unused and blank areas [ 157.4] Closing the overlay [ 158.3] Checking if the guest needs BIOS or UEFI to boot [ 158.3] Assigning disks to buses [ 158.3] Copying disk 1/1 to /tmp/v2v.R9CvD0/39dd1fc0-8a72-42f7-bc49-0ad67388f665/images/094280d5-2c86-4bb0-a69c-d462c09ca757/9d63632e-0177-49ee-ad5b-02d746497afd (raw) (100.00/100%) [ 200.8] Creating output metadata [ 200.9] Finishing off 4.After conversion ,power on the guest to check default kernel. #uname -a Linux localhost.localdomain 2.6.32-680.el6.x86_64 #1 SMP Tue Dec 13 19:38:29 EST 2016 x86_64 x86_64 x86_64 GNU/Linux #cat /boot/grub/grub.conf #boot=/dev/vda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux Server (2.6.32-680.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-680.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-680.el6.x86_64.img title Red Hat Enterprise Linux 6 (2.6.32-504.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-504.el6.x86_64 ro root=/dev/mapper/VolGroup-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD rd_LVM_LV=VolGroup/lv_swap SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=VolGroup/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet initrd /initramfs-2.6.32-504.el6.x86_64.img Actual results: As above description Expected results: virt-v2v should use the default kernel when convert a guest. Additional info: 1:With below builds virt-v2v also will use the latest kernel instead of the default kernel. virt-v2v-1.32.7-3.el7.x86_64 libguestfs-1.32.7-3.el7.x86_64 libvirt-2.0.0-10.el7.x86_64