Bug 594010
| Summary: | Commands running inside libguestfs appliance (eg yum) could not see 10.x network | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Rita Wu <rwu> | ||||||||
| Component: | libguestfs | Assignee: | Richard W.M. Jones <rjones> | ||||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Virtualization Bugs <virt-bugs> | ||||||||
| Severity: | medium | Docs Contact: | |||||||||
| Priority: | low | ||||||||||
| Version: | 5.5 | CC: | cwei, llim, mbooth, mshao, rjones | ||||||||
| Target Milestone: | rc | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | All | ||||||||||
| OS: | Linux | ||||||||||
| Whiteboard: | |||||||||||
| Fixed In Version: | 1.2.7-1.el5.1 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | |||||||||||
| : | 594070 (view as bug list) | Environment: | |||||||||
| Last Closed: | 2010-07-16 16:21:38 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: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 415381 [details]
log from LIBGUESTFS_TRACE=1 during conversion
Created attachment 415382 [details]
log from virt-inspect before conversion
Please include the yum.log or up2date log so we can see if the update is successful. 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 169.254.2.3" 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.
# 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 169.254.2.3" 0
><fs> sh "LANG=C /usr/bin/yum -y install kernel-2.6.18.194.el5"
Loaded plugins: rhnplugin, security
Setting up Install Process
No package kernel-2.6.18.194.el5 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
Size
===============================================================================================================================================================================================================
Installing:
kernel x86_64
2.6.18-194.3.1.el5
rhel-x86_64-server-5 19 M
Transaction Summary
===============================================================================================================================================================================================================
Install 1 Package(s)
Upgrade 0 Package(s)
Total download size: 19 M
...
(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-2.6.18.194.el5, so v2v falls through to local virt-v2v.conf way but not RHN way, and there is nothing in yum.log. 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. 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. Upstream fix was done in the following two commits: http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=fbf29976b33a69c64dc7847c54454bf2cfa5fde6 http://git.annexia.org/?p=libguestfs.git;a=commitdiff;h=8a9f2ca65521d093ac14307aca4370d9497ac840 (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. *** Bug 594070 has been marked as a duplicate of this bug. *** 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. This was released in 1:libguestfs-1.2.7-1.el5.3 |
Created attachment 415380 [details] virt-v2v.conf 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): v2v-libvirt-0.8.1-1.el5 virt-v2v-0.6.0-1.el5 How reproducible: always 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 3. 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.