Bug 1138184

Summary: virt-v2v will fail when converting guests with initramfs-*kdump.img under /boot
Product: Red Hat Enterprise Linux 7 Reporter: tingting zheng <tzheng>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1CC: codong, juzhou, mbooth, mzhan, ptoscano, rjones
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.27.38-1.1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:44:12 UTC Type: Bug
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 2014-09-04 08:27:10 UTC
Description
virt-v2v will fail when converting guests with initramfs-*kdump.img under /boot

Version:
libguestfs-tools-c-1.27.32-1.1.el7.x86_64
libguestfs-1.27.32-1.1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Prepare a guest installed kdump,there is initramfs-*kdump.img under /boot.
# cd /boot
# ls |grep initramfs-3.10.0-123.el7
initramfs-3.10.0-123.el7.x86_64.img
initramfs-3.10.0-123.el7.x86_64kdump.img

2.Run virt-v2v to convert the guest,error shows and virt-v2v fails.
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm rhel7-http
[   0.0] Opening the source -i libvirt rhel7-http
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   9.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
[   9.0] Inspecting the overlay
[  16.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM
virt-v2v: error: multiple files in /boot could be the initramfs
matching kernel 3.10.0-123.el7.  This could be a bug in virt-v2v.


virt-v2v: If reporting bugs, run virt-v2v with debugging enabled (-v
-x) and include the complete output.

Actual results:
As description.

Expected results:
Guest with initramfs-*kdump.img under /boot can be converted successfully by virt-v2v.

Additional info:

Comment 2 Richard W.M. Jones 2014-09-05 13:28:09 UTC
Upstream fix:

35d49cd9de8f07ae281b276bad852ad33875a9b8

(Included in libguestfs 1.27.38)

Comment 4 zhoujunqin 2014-09-10 09:35:01 UTC
I can reproduce this issue with bug description.

Try to verify with new version package:
virt-v2v-1.27.41-1.1.el7.x86_64
libguestfs-1.27.41-1.1.el7.x86_64

1. Prepare a guest installed kdump,there is initramfs-*kdump.img under /boot.
# cd /boot
# ls |grep initramfs
initramfs-3.10.0-131.el7.x86_64.img
initramfs-3.10.0-131.el7.x86_64kdump.img

2.Run virt-v2v to convert the guest, no error shows and virt-v2v successfully.

# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export --network rhevm  rhel7new 
[   0.0] Opening the source -i libvirt rhel7new
[   0.0] Creating an overlay to protect the source from being modified
[   0.0] Opening the overlay
[   2.0] Initializing the target -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export
[   2.0] Inspecting the overlay
[  13.0] Checking for sufficient free disk space in the guest
[  13.0] Converting Red Hat Enterprise Linux Server release 7.0 (Maipo) to run on KVM
virt-v2v: warning: could not update grub2 console: aug_get: no matching 
node (ignored)
[  46.0] Mapping filesystem data to avoid copying unused and blank areas
[  48.0] Closing the overlay
[  48.0] Copying disk 1/1 to /tmp/v2v.VkiwZi/5b625e34-c943-4407-949d-9b9926bdf406/images/dd1c3a24-9371-40d6-ba34-a7fff2b08bfa/8ea5709c-5f9e-40e3-a27a-b698736785f2 (qcow2)
    (100.00/100%)
[ 158.0] Creating output metadata
[ 158.0] Finishing off

So move to VERIFIED.

Comment 6 errata-xmlrpc 2015-03-05 13:44:12 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.

https://rhn.redhat.com/errata/RHBA-2015-0303.html