Bug 594010 - Commands running inside libguestfs appliance (eg yum) could not see 10.x network
Summary: Commands running inside libguestfs appliance (eg yum) could not see 10.x network
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: libguestfs
Version: 5.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
: 594070 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2010-05-20 10:38 UTC by Rita Wu
Modified: 2013-07-03 01:39 UTC (History)
5 users (show)

Fixed In Version: 1.2.7-1.el5.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 594070 (view as bug list)
Last Closed: 2010-07-16 16:21:38 UTC
Target Upstream Version:

Attachments (Terms of Use)
virt-v2v.conf (6.57 KB, application/octet-stream)
2010-05-20 10:38 UTC, Rita Wu
no flags Details
log from LIBGUESTFS_TRACE=1 during conversion (26.71 KB, text/plain)
2010-05-20 10:39 UTC, Rita Wu
no flags Details
log from virt-inspect before conversion (361.29 KB, text/plain)
2010-05-20 10:42 UTC, Rita Wu
no flags Details

Description Rita Wu 2010-05-20 10:38:14 UTC
Created attachment 415380 [details]

Description of problem:
The virt-v2v.conf is lower than the guest, so the guest is downgraded to a lower version of kernel.

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

How reproducible:

Steps to Reproduce:
1. In guest: rhn_register to register rhn
2. convert the guest registered rhn 
 #virt-v2v -f virt-v2v.conf -i libvirtxml -o rhev -osd nfs:/export domain_xml
Actual results:
the guest is still installed the kernel specified in virt-v2v.conf although it is registered rhn.

Expected results:
the guest registered rhn should 

Additional info:
Convert the guest without registering rhn, I'll get the error message:
virt-v2v -f /etc/virt-v2v.conf -i libvirtxml -o rhev -osd nfs:/export /tmp/xen-RHEL-4.8-32-pv.raw.xml
virt-v2v: Failed to install packages using up2date. Error message was: command:  at /usr/lib/perl5/vendor_perl/5.8.8/Sys/VirtV2V/GuestOS/RedHat.pm line 773.

Comment 1 Rita Wu 2010-05-20 10:39:44 UTC
Created attachment 415381 [details]
log from LIBGUESTFS_TRACE=1 during conversion

Comment 2 Rita Wu 2010-05-20 10:42:37 UTC
Created attachment 415382 [details]
log from virt-inspect before conversion

Comment 3 Lawrence Lim 2010-05-20 12:56:38 UTC
Please include the yum.log or up2date log so we can see if the update is successful.

Comment 4 Matthew Booth 2010-05-20 13:37:11 UTC
The Additional info output above is from a RHEL 4 machine. The LIBGUESTFS_TRACE output is from a machine with yum installed, so probably RHEL 5. Focussing in the TRACE output, the conversion tries to install a kernel here:

sh_lines "LANG=C /usr/bin/yum -y install kernel-2.6.18-194.el5"

It then immediately falls through to local config without displaying an error message, meaning that the yum output contained either 'No package' or 'already installed', but didn't return an error. I would put money on it being 'No package'.

Could you please run the following against the RHEL 5 image which produced the TRACE output above:

guestfish -i /path/to/rhel5.img
><fs> write_file "/etc/resolv.conf" "nameserver" 0
><fs> sh "LANG=C /usr/bin/yum -y install kernel-2.6.18-194.el5"

This will give us the output of the yum command which failed.

Comment 5 Rita Wu 2010-05-21 03:25:22 UTC
# guestfish -i /root/xen-rhel55-64-pv-rhn.raw 

Welcome to guestfish, the libguestfs filesystem interactive shell for
editing virtual machine filesystems.

Type: 'help' for help with commands
      'quit' to quit the shell

><fs> write-file  "/etc/resolv.conf" "nameserver" 0
><fs> sh "LANG=C /usr/bin/yum -y install kernel-"
Loaded plugins: rhnplugin, security
Setting up Install Process
No package kernel- available.
Nothing to do

But after conversion, I run the following inside RHEL5, I can get the newest
version of kernel:

[root@dhcp-66-83-43 log]# yum install kernel
Loaded plugins: rhnplugin, security
Skipping security plugin, no data
Setting up Update Process
Resolving Dependencies
Skipping security plugin, no data
--> Running transaction check
---> Package kernel.x86_64 0:2.6.18-194.3.1.el5 set to be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                                    Arch                               
       Version                                                  Repository     
 kernel                                     x86_64                             
rhel-x86_64-server-5                                      19 M

Transaction Summary
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 19 M


Comment 6 Rita Wu 2010-05-21 03:31:16 UTC
(In reply to comment #3)
> Please include the yum.log or up2date log so we can see if the update is
> successful.    

As we can see in Comment 5, packages cannot be found via /usr/bin/yum -y install kernel-, so v2v falls through to local virt-v2v.conf way but not RHN way,  and there is nothing in yum.log.

Comment 7 Matthew Booth 2010-05-21 11:04:39 UTC
I've tracked this down to an old version of libguestfs. virt-v2v should require libguestfs >= 1.2.7. Unfortunately it doesn't, and even it if it did, libguestfs-1.2.7 isn't build for RHEL 5 yet. Both of these will be fixed today.

Comment 8 Matthew Booth 2010-05-25 14:44:50 UTC
This is fixed in version 1.2.7-1.el5.1 of libguestfs. Note, however, that the version dependency of virt-v2v hasn't yet been updated.

Comment 9 Richard W.M. Jones 2010-05-25 15:09:57 UTC
Upstream fix was done in the following two commits:


(see bug 588763 for the upstream request)

Commit 8a9 went into the stable branch, thus we got that in
the rebase to 1.2.7.

Commit fbf has been added as an explicit patch by Matt.

An additional RHEL-5 specific patch was needed to deal with
the old version of qemu, and that was created & added by Matt.

Thus, this is now fixed in the RHEL-5-V2V branch, and ready
for QA testing.

Comment 10 Matthew Booth 2010-05-25 15:14:43 UTC
*** Bug 594070 has been marked as a duplicate of this bug. ***

Comment 11 Rita Wu 2010-05-26 05:47:17 UTC
Verified on libguestfs-1.2.7 and virt-v2v-0.6.0-1.el5.

Now the VM can running RHN to update successfully during conversion.

Comment 12 Matthew Booth 2010-07-16 16:21:38 UTC
This was released in 1:libguestfs-1.2.7-1.el5.3

Note You need to log in before you can comment on or make changes to this bug.