Bug 742757

Summary: virt-v2v always use the first kernel (0th kernel) instead of the default kernel (ex: default=1).
Product: Red Hat Enterprise Linux 5 Reporter: Anil Vettathu <avettath>
Component: virt-v2vAssignee: Matthew Booth <mbooth>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: mbooth, mkenneth, rjones, rwu, tzheng, whuang, yupzhang
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 821367 (view as bug list) Environment:
Last Closed: 2012-04-23 10:10:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 807971, 821367    
Attachments:
Description Flags
output of the conversion run with LIBGUESTFS_TRACE=1 none

Description Anil Vettathu 2011-10-02 14:32:21 UTC
Created attachment 525937 [details]
output of the conversion run with LIBGUESTFS_TRACE=1

Description of problem:

virt-v2v always use the first kernel (0th kernel) instead of the default kernel (ex: default=1). 

Version-Release number of selected component (if applicable):

virt-v2v-0.7.1-4.el5


How reproducible:

Always.

Steps to Reproduce:

Before migration: - note that running kernel is in position 1
p652900@qvlsbd01:~$ uname -r
2.6.18-194.26.1.el5

p652900@qvlsbd01:~$ sudo cat /etc/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/vg_system_01/root_vol
#          initrd /initrd-version.img
#boot=/dev/sda
default=1
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-194.17.4.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.17.4.el5 ro root=/dev/vg_system_01/root_vol divider=10 clocksource=acpi_pm
	initrd /initrd-2.6.18-194.17.4.el5.img
title Red Hat Enterprise Linux Server (2.6.18-194.26.1.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.26.1.el5 ro root=/dev/vg_system_01/root_vol divider=10 clocksource=acpi_pm
	initrd /initrd-2.6.18-194.26.1.el5.img
title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.3.1.el5 ro root=/dev/vg_system_01/root_vol divider=10 clocksource=acpi_pm
	initrd /initrd-2.6.18-194.3.1.el5.img


After migration:

[root@qvlsbd01 ~]# uname -r
2.6.18-194.17.4.el5

[root@qvlsbd01 ~]# cat /etc/grub.conf 
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/vg_system_01/root_vol
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-194.17.4.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.17.4.el5 ro root=/dev/vg_system_01/root_vol divider=10 clocksource=acpi_pm
	initrd /initrd-2.6.18-194.17.4.el5.img
title Red Hat Enterprise Linux Server (2.6.18-194.26.1.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.26.1.el5 ro root=/dev/vg_system_01/root_vol divider=10 clocksource=acpi_pm
	initrd /initrd-2.6.18-194.26.1.el5.img
title Red Hat Enterprise Linux Server (2.6.18-194.3.1.el5)
	root (hd0,0)
	kernel /vmlinuz-2.6.18-194.3.1.el5 ro root=/dev/vg_system_01/root_vol divider=10 clocksource=acpi_pm
	initrd /initrd-2.6.18-194.3.1.el5.img

Can only boot off 2.6.18-194.17.4.el5, if i boot from the other 2 i get a kernel panic, screen shot attached.

To resolve the issue, i need to mkinitrd the latest kernel, then it boots fine if i set it as default.
  
Expected results:

virt-v2v should use the default kernel to create new migrated VM.


Additional info:

Comment 1 RHEL Program Management 2012-04-02 10:41:00 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 2 Matthew Booth 2012-04-23 10:10:37 UTC
Users are encouraged to use virt-v2v from RHEL 6.