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.

Bug 800353

Summary: Failed to install packages using yum during conversion of virt-v2v
Product: Red Hat Enterprise Linux 6 Reporter: tingting zheng <tzheng>
Component: virt-v2vAssignee: Matthew Booth <mbooth>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: medium    
Version: 6.3CC: jwu, lcui, rjones, rwu, yupzhang
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-v2v-0.8.7-4.el6 Doc Type: Bug Fix
Doc Text:
No documentation required. This bug was never in a RHEL release.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 12:42:10 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:

Description tingting zheng 2012-03-06 11:40:04 UTC
Description of Problem:
When use virt-v2v to convert a guest,failed to install packages with yum during conversion

Version-Release number of selected component:
virt-v2v-0.8.7-3.el6.x86_64
libvirt-0.9.10-3.el6.x86_64
libguestfs-1.16.8-1.el6.x86_64


How reproducible:
Always

Step to Reproduce:
1.Add items to install custom packages during linux conversions in /etc/virt-v2v.conf.
  <capability os='linux' distro='rhel' major='6' name='user-custom'>
    <dep name='zsh' minversion='4.3.10-4.1.el6' />
  </capability>

    <app os='linux' distro='rhel' major='6' arch='x86_64' name='zsh'>
    <path>rhel/6/zsh-4.3.10-4.1.el6.x86_64.rpm</path>
  </app>

2.Download zsh-4.3.10-4.1.el6.x86_64.rpm and put it under
/var/lib/virt-v2v/software/rhel/6.

3.Prepare a guest configured with yum repo.

4.Use virt-v2v to convert the guest:
# virt-v2v  -ic qemu+ssh://10.66.72.122/system -os default -b breth0 kvm-rhel6.2-x86_64-qcow2
rhel6u1-64b-qcow2: 100% [=========================================================================================]D 0h02m33s
virt-v2v: WARNING: Failed to install packages using yum. Output was: sh_lines: sh_lines: http://download.englab.nay.redhat.com/pub/rhel/nightly/latest-RHEL-6/6.3/Server/x86_64/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'download.englab.nay.redhat.com'"
Trying other mirror.
http://download.englab.nay.redhat.com/pub/rhel/nightly/latest-RHEL-6/6.3/Server/x86_64/os/Packages/zsh-4.3.10-4.1.el6.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - "Couldn't resolve host 'download.englab.nay.redhat.com'"
Trying other mirror.


Error Downloading Packages:
  zsh-4.3.10-4.1.el6.x86_64: failure: Packages/zsh-4.3.10-4.1.el6.x86_64.rpm from rhel6.2: [Errno 256] No more mirrors to try. at /usr/share/perl5/vendor_perl/Sys/VirtConvert/GuestfsHandle.pm line 197.
 at /usr/share/perl5/vendor_perl/Sys/VirtConvert/Converter/RedHat.pm line 1353

virt-v2v: WARNING: The connected hypervisor does not support feature pae.
virt-v2v: kvm-rhel6.2-x86_64-qcow2 configured with virtio drivers.


Actual Results:
Failed to install packages using yum during the conversion. 


Expected Results:
Virt-v2v can install packages using yum during the conversion.

Additional info:
Before and after conversion,the network of the guest is ok.

Comment 1 tingting zheng 2012-03-06 11:51:26 UTC
Use guestfish to debug the problem:
# guestfish -a /var/lib/libvirt/images/rhel6u1-64b-qcow2 

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

Type: 'help' for help on commands
      'man' to read the manual
      'quit' to quit the shell

><fs> set-network true
><fs> lauch
lauch: unknown command
><fs> launch
 100% ⟦▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓⟧ 00:00
><fs> list-filesystems 
/dev/vda1: ext4
/dev/vg_amd2431322/lv_root: ext4
/dev/vg_amd2431322/lv_swap: swap
><fs> mount /dev/vda1 /
><fs> command "dig"
libguestfs: error: command: dig: No such file or directory
><fs> command "getent hosts www.redhat.com"
libguestfs: error: command: getent: No such file or directory
><fs> umount /
><fs> mount /dev/vg_amd2431322/lv_root /
><fs> mount /dev/vda1 /boot
><fs> command "dig"

><fs> command "getent hosts www.redhat.com"
96.17.135.214   e1890.b.akamaiedge.net www.redhat.com wildcard.redhat.com.edgekey.net wildcard.redhat.com.edgekey.net.globalredir.akadns.net

Comment 4 Matthew Booth 2012-03-07 11:18:22 UTC
Fixed in upstream commit ce8aba5161a28d27af4438031ba586d3c918d4e8

Comment 5 tingting zheng 2012-03-09 07:13:46 UTC
Tested the bug with:
virt-v2v-0.8.7-4.el6.x86_64
libvirt-0.9.10-4.el6.x86_64
libguestfs-1.16.8-1.el6.x86_64

Steps:
1.Add items to install custom packages during linux conversions in
/etc/virt-v2v.conf.
  <capability os='linux' distro='rhel' major='6' name='user-custom'>
    <dep name='zsh' minversion='4.3.10-4.1.el6' />
  </capability>

    <app os='linux' distro='rhel' major='6' arch='x86_64' name='zsh'>
    <path>rhel/6/zsh-4.3.10-4.1.el6.x86_64.rpm</path>
  </app>

2.Prepare a guest configured with yum repo.

3.Use virt-v2v to convert the guest:
# virt-v2v  -ic qemu+ssh://10.66.72.122/system -os default -b switch kvm-rhel6.2-x86_64-qcow2
rhel6u1-64b-qcow2: 100% [=========================================================================================]D 0h01m52s
virt-v2v: WARNING: The connected hypervisor does not support feature pae.
virt-v2v: kvm-rhel6.2-x86_64-qcow2 configured with virtio drivers.

4.After conversion,check the guest,the package has been installed.

So change the status of the bug to VERIFIED.

Comment 6 Matthew Booth 2012-04-11 14:08:33 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation required.

This bug was never in a RHEL release.

Comment 8 errata-xmlrpc 2012-06-20 12:42:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0788.html