Bug 1150475 - Exporting 2+ disk guest to RHEV, only one disk shows after import
Summary: Exporting 2+ disk guest to RHEV, only one disk shows after import
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Richard W.M. Jones
QA Contact: Virtualization Bugs
URL:
Whiteboard: V2V
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-08 11:10 UTC by Richard W.M. Jones
Modified: 2015-03-05 13:45 UTC (History)
7 users (show)

Fixed In Version: libguestfs-1.27.60-1.1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:45:51 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0303 0 normal SHIPPED_LIVE libguestfs bug fix and enhancement update 2015-03-05 17:34:44 UTC

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

Upstream discussion:
https://www.redhat.com/archives/libguestfs/2014-October/thread.html#00055

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:

https://github.com/libguestfs/libguestfs/commit/7c97b01f2754ffb76f94b68497eb5829ffa92390

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:

https://github.com/libguestfs/libguestfs/commit/7c97b01f2754ffb76f94b68497eb5829ffa92390
https://github.com/libguestfs/libguestfs/commit/8adc32cae8898817bfa2ed7669eda1f6c4aa3dae
https://github.com/libguestfs/libguestfs/commit/43e150c212c311aa9dbf535faa756b34bf7f580a
https://github.com/libguestfs/libguestfs/commit/c4bad9deaf04b4329d0ecb38c007017d6330391c

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

Comment 4 tingting zheng 2014-10-09 06:26:52 UTC
Tested with:
virt-v2v-1.27.60-1.1.el7.x86_64
libguestfs-1.27.60-1.1.el7.x86_64

1.Use virt-v2v to convert a guest with 2 disks to rhev.
# virt-v2v -ic xen+ssh://10.66.106.64 -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export  rhel6.6-i386-hvm -on 2disk-test  -of qcow2
[   0.0] Opening the source -i libvirt -ic xen+ssh://10.66.106.64 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 10.66.90.115:/vol/v2v_auto/auto_export
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)
    (100.00/100%)
[ 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)
    (100.00/100%)
[ 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.

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


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