Bug 1150475

Summary: Exporting 2+ disk guest to RHEV, only one disk shows after import
Product: Red Hat Enterprise Linux 7 Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: dyuan, juzhou, mbooth, mzhan, ptoscano, rjones, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: V2V
Fixed In Version: libguestfs-1.27.60-1.1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 13:45:51 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:

Description Richard W.M. Jones 2014-10-08 11:10:16 UTC
Description of problem:

Upstream discussion:

If you export a guest which has two or more disks to RHEV, only
one disk shows up after importing it into RHEV.

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

virt-v2v 1.27.58

How reproducible:

100% (reproduced by two independent people)

Steps to Reproduce:
1. Take a guest which has two disks.
2. Convert and export it to RHEV, eg:
   virt-v2v guest-2disks -o rhev -os server:/esd
3. Import the disk from the Export Storage Domain into RHEV.

Comment 2 Richard W.M. Jones 2014-10-08 11:42:04 UTC
Diffing the old and new virt-v2v code, I noticed that we didn't
add a <rasd:Caption/> field for the disk.  This is fixed in:


I don't know if this will fix the current bug - still testing.

Comment 3 Richard W.M. Jones 2014-10-08 14:26:04 UTC
So it turned out to be a bit of an f-up, but I seem to have fixed
it.  You have to use one subdirectory of images/ per disk, not one
subdirectory per guest containing all the disks.

The commits are:


Fix will be included in virt-v2v >= 1.27.60.

Comment 4 tingting zheng 2014-10-09 06:26:52 UTC
Tested with:

1.Use virt-v2v to convert a guest with 2 disks to rhev.
# virt-v2v -ic xen+ssh:// -o rhev -os  rhel6.6-i386-hvm -on 2disk-test  -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh:// rhel6.6-i386-hvm
[  17.0] Creating an overlay to protect the source from being modified
[  47.0] Opening the overlay
[ 268.0] Initializing the target -o rhev -os
virt-v2v: warning: cannot write files to the NFS server as 36:36, even 
though we appear to be running as root. This probably means the NFS client 
or idmapd is not configured properly.

You will have to chown the files that virt-v2v creates after the run, 
otherwise RHEV-M will not be able to import the VM.
[ 268.0] Inspecting the overlay
[ 275.0] Checking for sufficient free disk space in the guest
[ 275.0] Estimating space required on target for each disk
[ 275.0] Converting Red Hat Enterprise Linux Server release 6.6 Beta (Santiago) to run on KVM
This guest has virtio drivers installed.
[ 332.0] Mapping filesystem data to avoid copying unused and blank areas
[ 332.0] Closing the overlay
[ 332.0] Copying disk 1/2 to /tmp/v2v.UnQnaI/46adae8a-63c1-40f8-b25a-f02deb1a5160/images/98d726de-b736-48e9-94e9-fd7ea031df36/f59c3083-ccb5-45cd-a9f8-a59f827a3d87 (qcow2)
[ 407.0] Copying disk 2/2 to /tmp/v2v.UnQnaI/46adae8a-63c1-40f8-b25a-f02deb1a5160/images/2bc3b65b-893f-4053-b83d-d0f40f16bcc7/4ace85b9-1a7b-4d3f-9118-20eec1bd371f (qcow2)
[ 546.0] Creating output metadata
[ 546.0] Finishing off

2.After conversion,import the guest,2 disks showed.Login the guest,2 disk shows after fdisk -l command.

Comment 6 tingting zheng 2014-10-10 02:53:33 UTC
Refer to comment 4,move the bug to VERIFIED.

Comment 8 errata-xmlrpc 2015-03-05 13:45:51 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.