Bug 613562

Summary: virt-v2v | rhel6 v2v doesn't support install the guest driver by rhn
Product: Red Hat Enterprise Linux 6 Reporter: Mohua Li <moli>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED CURRENTRELEASE QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: high    
Version: 6.0CC: cshao, hbrock, leiwang, llim, mbooth, moli, mshao, rwu, syeghiay
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: libguestfs-1.2.7-1.21.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 21:03:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 613967    
Bug Blocks:    
Attachments:
Description Flags
virt-inspector output of xenpv rhel5.5
none
virt-inspector output of xenpv rhel5.5 none

Description Mohua Li 2010-07-12 09:23:43 UTC
Description of problem:
convert the guest image with rhn register like below, actually fail with the error below, added virt-inspector of the image output in the attachment, 

virt-v2v -f /etc/virt-v2v.conf -i libvirtxml -o rhev -osd 10.66.90.115:/vol/v2vrwu/rwuv2v/ /tmp/rhel5u5-64b-pv-raw-intel.img.xml

virt-v2v: Installation failed because the following files referenced in the configuration file are required, but missing: rhel/5/kernel-2.6.18-128.el5.x86_64.rpm rhel/5/ecryptfs-utils-56-8.el5.x86_64.rpm rhel/5/ecryptfs-utils-56-8.el5.i386.rpm

virt-v2v: Installation failed because the following files referenced in the configuration file are required, but missing: rhel/5/kernel-2.6.18-128.el5.x86_64.rpm rhel/5/ecryptfs-utils-56-8.el5.x86_64.rpm rhel/5/ecryptfs-utils-56-8.el5.i386.rpm

virt-v2v: No bootable kernels installed, and no replacement is available.

Unable to continue.

Error: Convert image /mnt/rhn/xenpv/rhel5u5-64b-pv-raw-intel.img failed 

Version-Release number of selected component (if applicable):
rhel6 beta2 snapshot7,
libguestfs-1.2.7-1.el6.5.x86_64
virt-v2v-0.6.1-1.el6.x86_64
libvirt-0.8.1-13.el6.x86_64



How reproducible:
always

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Mohua Li 2010-07-12 09:30:59 UTC
Created attachment 431123 [details]
virt-inspector output of xenpv rhel5.5

Comment 3 Mohua Li 2010-07-12 09:56:37 UTC
Created attachment 431126 [details]
virt-inspector output of xenpv rhel5.5

Comment 4 Mohua Li 2010-07-14 02:07:19 UTC
use the rhel 5 xen remotely to convert the guest with rhn registration also fail, if no local files found to be installed, should use the rhn to install the necessary package, 


//10.66.92.96  is a rhel5 with xen kernel, 


[root@dhcp-66-70-73 v2v]# virt-v2v -f /etc/virt-v2v.conf -ic xen+ssh://10.66.92.96  -o rhev -osd 10.66.93.224:/v2v/export    rhel4u8-64b-pv-raw-intel
root.92.96's password: 
root.92.96's password: 
add_drive_with_if "/tmp/QrlDyS6SB8/c1e9a843-739a-4f8e-912d-c27f0ecbe69b/v2v.9wmv5bdD/1bedb45d-fd52-472f-bc09-427f6e7a22d2/c21d9094-88b3-4fe2-9a4b-4da3ce7d8af3" "ide"
add_drive_ro_with_if "/var/lib/virt-v2v/transfer.iso" "ide"
launch
set_autosync true
list_partitions
pvs
available "lvm2"
lvs
file "/dev/VolGroup00/LogVol00"
get_e2uuid "/dev/VolGroup00/LogVol00"
get_e2label "/dev/VolGroup00/LogVol00"
mount_ro "/dev/VolGroup00/LogVol00" "/"
is_file "/grub/menu.lst"
is_file "/grub/grub.conf"
is_dir "/etc"
is_dir "/bin"
is_file "/etc/fstab"
exists "/etc/redhat-release"
cat "/etc/redhat-release"
cat "/etc/fstab"
is_file "/bin/bash"
file "/bin/bash"
umount_all
file "/dev/VolGroup00/LogVol01"
umount_all
file "/dev/sda1"
get_e2uuid "/dev/sda1"
get_e2label "/dev/sda1"
mount_ro "/dev/sda1" "/"
is_file "/grub/menu.lst"
is_file "/grub/grub.conf"
umount_all
mount_options "" "/dev/VolGroup00/LogVol00" "/"
is_dir "/boot"
mount_options "" "/dev/sda1" "/boot"
command_lines "rpm -q -a --qf %{name} %{epoch} %{version} %{release} %{arch}
"
available "augeas"
aug_init "/" 16
aug_match "/files//etc/grub.conf/title"
aug_get "/files/etc/grub.conf/title"
aug_get "/files/etc/grub.conf/title/kernel"
aug_match "/files/etc/grub.conf/title/kernel/*"
aug_get "/files/etc/grub.conf/title/kernel/ro"
aug_get "/files/etc/grub.conf/title/kernel/root"
aug_get "/files/etc/grub.conf/title/kernel/rhgb"
aug_get "/files/etc/grub.conf/title/kernel/quiet"
exists "/boot/vmlinuz-2.6.9-89.ELxenU"
command "rpm -qf --qf %{NAME} /boot/vmlinuz-2.6.9-89.ELxenU"
file "/boot/vmlinuz-2.6.9-89.ELxenU"
is_dir "/lib/modules/2.6.9-89.ELxenU"
find "/lib/modules/2.6.9-89.ELxenU"
file "/lib/modules/2.6.9-89.ELxenU/kernel/arch/x86_64/oprofile/oprofile.ko"
aug_get "/files/etc/grub.conf/title/initrd"
exists "/boot/initrd-2.6.9-89.ELxenU.img"
file "/boot/initrd-2.6.9-89.ELxenU.img"
initrd_list "/boot/initrd-2.6.9-89.ELxenU.img"
aug_get "/files//etc/grub.conf/default"
aug_init "/" 16
aug_set "/augeas/load/Modprobe/incl[last()+1]" "/etc/modules.conf"
aug_set "/augeas/load/Modprobe/incl[last()+1]" "/etc/conf.modules"
aug_load
aug_match "/files/etc/conf.modules/alias"
aug_match "/files/etc/modules.conf/alias"
aug_match "/files/etc/modprobe.conf/alias"
aug_get "/files/etc/modprobe.conf/alias[1]"
aug_get "/files/etc/modprobe.conf/alias[1]/modulename"
aug_get "/files/etc/modprobe.conf/alias[2]"
aug_get "/files/etc/modprobe.conf/alias[2]/modulename"
aug_match "/files/etc/modprobe.d/*/alias"
exists "/usr/sbin/load_policy"
touch "/.autorelabel"
exists "/etc/conf.modules"
exists "/etc/modules.conf"
exists "/etc/modprobe.conf"
exists "/etc/modprobe.d"
aug_close
aug_init "/" 1
aug_match "/augeas/load/Grub/incl"
aug_get "/augeas/load/Grub/incl[1]"
aug_get "/augeas/load/Grub/incl[2]"
exists "/etc/X11/xorg.conf"
aug_load
glob_expand "/boot/vmlinuz-*"
exists "/etc/resolv.conf"
mv "/etc/resolv.conf" "/etc/resolv.conf.v2vtmp"
write_file "/etc/resolv.conf" "nameserver 169.254.2.3" 0
exists "/usr/bin/up2date"
exists "/etc/sysconfig/rhn/systemid"
command "/usr/bin/python -c import sys; sys.path.append('/usr/share/rhn'); import actions.packages;                       actions.packages.cfg['forceInstall'] = 1;      ret = actions.packages.update([['kernel-smp', '2.6.9', '89.EL', '']]); sys.exit(ret[0]);                              "
virt-v2v: Failed to install packages using up2date. Error message was: command:  at /usr/share/perl5/Sys/VirtV2V/GuestfsHandle.pm line 187.

exists "/usr/bin/yum"
mkdtemp "/transferXXXXXX"
list_devices
mount_ro "/dev/sdb" "/transferOqxTVD"
exists "/transferOqxTVD/rhel/4/kernel-smp-2.6.9-89.EL.x86_64.rpm"
virt-v2v: Installation failed because the following files referenced in the configuration file are required, but missing: rhel/4/kernel-smp-2.6.9-89.EL.x86_64.rpm
mv "/etc/resolv.conf.v2vtmp" "/etc/resolv.conf"
aug_load
glob_expand "/boot/vmlinuz-*"
aug_get "/files/boot/grub/menu.lst/default"
aug_match "/files/boot/grub/menu.lst/title[0]/kernel"
aug_match "/files/boot/grub/menu.lst/title/kernel"
aug_get "/files/boot/grub/menu.lst/title/kernel"
exists "/boot/vmlinuz-2.6.9-89.ELxenU"
command "rpm -qf --qf %{NAME} /boot/vmlinuz-2.6.9-89.ELxenU"
file "/boot/vmlinuz-2.6.9-89.ELxenU"
is_dir "/lib/modules/2.6.9-89.ELxenU"
find "/lib/modules/2.6.9-89.ELxenU"
file "/lib/modules/2.6.9-89.ELxenU/kernel/arch/x86_64/oprofile/oprofile.ko"
glob_expand "/boot/vmlinuz-*"
exists "/etc/resolv.conf"
mv "/etc/resolv.conf" "/etc/resolv.conf.v2vtmp"
write_file "/etc/resolv.conf" "nameserver 169.254.2.3" 0
exists "/usr/bin/up2date"
exists "/etc/sysconfig/rhn/systemid"
command "/usr/bin/python -c import sys; sys.path.append('/usr/share/rhn'); import actions.packages;                       actions.packages.cfg['forceInstall'] = 1;      ret = actions.packages.update([['kernel-smp', '', '', '']]); sys.exit(ret[0]);                              "
virt-v2v: Failed to install packages using up2date. Error message was: command:  at /usr/share/perl5/Sys/VirtV2V/GuestfsHandle.pm line 187.

exists "/usr/bin/yum"
exists "/transferOqxTVD/rhel/4/kernel-smp-2.6.9-89.EL.x86_64.rpm"
virt-v2v: Installation failed because the following files referenced in the configuration file are required, but missing: rhel/4/kernel-smp-2.6.9-89.EL.x86_64.rpm
mv "/etc/resolv.conf.v2vtmp" "/etc/resolv.conf"
aug_load
umount "/transferOqxTVD"
rmdir "/transferOqxTVD"
umount_all
sync
kill_subprocess
virt-v2v: No bootable kernels installed, and no replacement is available.
Unable to continue.

Comment 5 RHEL Program Management 2010-07-15 14:30:17 UTC
This issue has been proposed when we are only considering blocker
issues in the current Red Hat Enterprise Linux release. It has
been denied for the current Red Hat Enterprise Linux release.

** If you would still like this issue considered for the current
release, ask your support representative to file as a blocker on
your behalf. Otherwise ask that it be considered for the next
Red Hat Enterprise Linux release. **

Comment 6 Matthew Booth 2010-07-26 15:24:36 UTC
Fixed in libguestfs-1.2.7-1.21.el6

Comment 7 Mohua Li 2010-07-28 10:08:08 UTC
as blocked by [Bug 613967] v2v fail to convert any xenpv in rhel6, so verified this bug later

Comment 9 Mohua Li 2010-08-09 09:30:27 UTC
this bug block by 613967, test version is 

libguestfs-1.2.7-1.23.el6.x86_64
libvirt-0.8.1-21.el6.x86_64
virt-v2v-0.6.1-2.el6.x86_64

can't complete this bug until bug 613967 fixed,

Comment 10 Mohua Li 2010-08-11 04:29:43 UTC
test on,
virt-v2v-0.6.2-1.el6.x86_64
augeas-0.7.2-3.el6.x86_64
augeas-libs-0.7.2-3.el6.x86_64
libguestfs-1.2.7-1.23.el6.x86_64

steps,
1,rm /var/lib/virt-v2v/transfer.iso,
2,cd /var/lib/virt-v2v/software; mv rhel ..
3,mount -o loop transfer.iso   /mnt (check there is no rhel software),
4,convert the rhel guest with rhn, 

[root@dhcp-66-70-73 log]# virt-v2v  -ic  xen+ssh://10.66.93.224 -o rhev -osd 10.66.90.115:/vol/v2vwulinglu/wulingluv2v/export  rhel4u8-64b-pv-raw-intel
root.93.224's password:
root.93.224's password:
add_drive_with_if "/tmp/dQMiF7Vln_/3aeaa841-9eee-4bae-804e-1395086bb18e/v2v.5YtqLar9/e6c0a17a-6e89-4fe7-ab99-7a5dbe9d1b6b/6f2ed15b-cbfe-48af-b815-524afa920ded" "ide"
add_drive_ro_with_if "/var/lib/virt-v2v/transfer.iso" "ide"


................
............

mv "/etc/resolv.conf" "/etc/resolv.conf.v2vtmp"
write_file "/etc/resolv.conf" "nameserver 169.254.2.3" 0
exists "/usr/bin/up2date"
exists "/etc/sysconfig/rhn/systemid"
command "/usr/bin/python -c import sys; sys.path.append('/usr/share/rhn'); import actions.packages;                       actions.packages.cfg['forceInstall'] = 1;      ret = actions.packages.update([['kernel-smp', '2.6.9', '89.EL', '']]); sys.exit(ret[0]);                              "


mv "/etc/resolv.conf.v2vtmp" "/etc/resolv.conf"
aug_load
glob_expand "/boot/vmlinuz-*"
....

sh "root_lvm=1 /sbin/mkinitrd --with=virtio --with=virtio_ring --with=virtio_blk --with=virtio_net --with=virtio_pci /boot/initrd-2.6.9-89.ELsmp.img 2.6.9-89.ELsmp"
exists "/etc/init.d/kudzu"
command "/sbin/chkconfig kudzu off"
umount_all
sync
kill_subprocess
virt-v2v: rhel4u8-64b-pv-raw-intel configured with virtio drivers

according to the result, so the bug is fixed,

Comment 11 releng-rhel@redhat.com 2010-11-10 21:03:06 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.