Bug 1308769 - virt-v2v does not copy additional disks to Glance
virt-v2v does not copy additional disks to Glance
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libguestfs (Show other bugs)
7.2
Unspecified Unspecified
urgent Severity urgent
: rc
: ---
Assigned To: Richard W.M. Jones
Virtualization Bugs
V2V
: ZStream
Depends On:
Blocks: 1218766 1316625
  Show dependency treegraph
 
Reported: 2016-02-15 19:24 EST by Dayle Parker
Modified: 2016-11-03 13:58 EDT (History)
13 users (show)

See Also:
Fixed In Version: libguestfs-1.32.4-1.el7
Doc Type: Bug Fix
Doc Text:
With this update, virt-v2v is capable of exporting guests with more than one disk to the OpenStack Glance service, while previously, only guests with a single disk could be exported. This makes it possible for larger virtual deployments to be converted to OpenStack Glance using virt-v2v.
Story Points: ---
Clone Of:
: 1316625 (view as bug list)
Environment:
Last Closed: 2016-11-03 13:58:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 4 Richard W.M. Jones 2016-02-16 10:56:02 EST
Patch posted upstream:
https://www.redhat.com/archives/libguestfs/2016-February/thread.html#00109
Comment 5 Richard W.M. Jones 2016-02-16 11:03:41 EST
For QA, I tested this by creating a CentOS guest:

$ virt-builder centos-6.img

Then I created a second empty disk:

$ truncate -s 1G centos-6-2.img

Then I created some libvirt XML to describe the guest.  See
http://libguestfs.org/virt-v2v.1.html#minimal-xml-for--i-libvirtxml-option

Then I imported the guest to Glance by doing:

$ virt-v2v -i libvirtxml centos-6.xml -o glance -of qcow2 -on test1

You should see 2 disks being created in Glance.  They will be called
"test1" and "test1-disk2".
Comment 19 keanli 2016-05-02 23:36:34 EDT
I can reproduce it with builds:
libguestfs-1.28.1-1.55.el7.x86_64
virt-v2v-1.28.1-1.55.el7.x86_64
kernel:kernel-3.10.0-327.el7.x86_64    
virtio-win-1.8.0-4.el7.noarch

Verify it with builds:
libguestfs-1.32.4-1.el7.x86_64
virt-v2v-1.32.4-1.el7.x86_64
kernel:3.10.0-376.el7.x86_64
virtio-win-1.8.0-4.el7.noarch

Steps:
Scenario 1:
1.1prepare a guest with muiltiple disk:
#virsh dumpxml $guest | grep disk -A7
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='win-sda'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='win-sdb'/>
      <target dev='vdb' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </disk>
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='win-sdc'/>
      <target dev='vdc' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </disk>
    <disk type='volume' device='disk'>
      <driver name='qemu' type='raw' cache='none'/>
      <source pool='default' volume='win-sdd'/>
      <target dev='vdd' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='direct'>
      <mac address='00:50:56:b7:bb:cc'/>
      <source dev='enp0s25' mode='bridge'/>

1.2.Convert a linux guest with multiple disk to openstack using virt-v2v 
#virt-v2v -ic vpx://root@10.66.4.103/tzheng-demo/10.73.3.19/?no_verify=1 -o glance rhel7-juzhou-standard-cdrom-multidisks --password-file /tmp/passwd  -on kean
[   0.0] Opening the source -i libvirt -ic vpx://root@10.66.4.103/tzheng-demo/10.73.3.19/?no_verify=1 rhel7-juzhou-standard-cdrom-multidisks
[   1.0] Creating an overlay to protect the source from being modified
[   2.4] Initializing the target -o glance
[   3.2] Opening the overlay
[  49.9] Inspecting the overlay
[ 111.0] Checking for sufficient free disk space in the guest
[ 111.0] Estimating space required on target for each disk
[ 111.0] Converting Red Hat Enterprise Linux Server 7.0 (Maipo) to run on KVM
virt-v2v: This guest has virtio drivers installed.
[ 524.5] Mapping filesystem data to avoid copying unused and blank areas
[ 525.6] Closing the overlay
[ 525.7] Checking if the guest needs BIOS or UEFI to boot
[ 525.7] Assigning disks to buses
[ 525.7] Copying disk 1/2 to /var/tmp/glance.OAvf9d/sda (raw)
    (100.00/100%)
[ 892.5] Copying disk 2/2 to /var/tmp/glance.OAvf9d/sdb (raw)
    (100.00/100%)
[ 983.8] Creating output metadata
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | a53f5804058734f82a00943d3fa28a4b     |
| container_format | bare                                 |
| created_at       | 2016-04-29T04:58:00.000000           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | raw                                  |
| id               | 456888fb-24f2-419e-a3eb-57a76f3ca5aa |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | kean                                 |
| owner            | 6c4dac53186d44fcbac29d3f3f575125     |
| protected        | False                                |
| size             | 8589934592                           |
| status           | active                               |
| updated_at       | 2016-04-29T04:59:33.000000           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| Property 'architecture'    | x86_64                               |
| Property 'hw_disk_bus'     | virtio                               |
| Property 'hw_vif_model'    | virtio                               |
| Property 'hypervisor_type' | kvm                                  |
| Property 'os_distro'       | rhel                                 |
| Property 'os_type'         | linux                                |
| Property 'os_version'      | 7                                    |
| Property 'vm_mode'         | hvm                                  |
| checksum            daigu       | a53f5804058734f82a00943d3fa28a4b     |
| container_format           | bare                                 |
| created_at                 | 2016-04-29T04:58:00.000000           |
| deleted                    | False                                |
| deleted_at                 | None                                 |
| disk_format                | raw                                  |
| id                         | 456888fb-24f2-419e-a3eb-57a76f3ca5aa |
| is_public                  | False                                |
| min_disk                   | 0                                    |
| min_ram                    | 2060                                 |
| name                       | kean                                 |
| owner                      | 6c4dac53186d44fcbac29d3f3f575125     |
| protected                  | False                                |
| size                       | 8589934592                           |
| status                     | active                               |
| updated_at                 | 2016-04-29T04:59:39.000000           |
| virtual_size               | None                                 |
+----------------------------+--------------------------------------+
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | a981130cf2b7e09f4686dc273cf7187e     |
| container_format | bare                                 |
| created_at       | 2016-04-29T04:59:40.000000           |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | raw                                  |
| id               | 31f210cd-5b37-4943-b427-0d7f94c6e0aa |
| is_public        | False                                |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | kean-disk2                           |
| owner            | 6c4dac53186d44fcbac29d3f3f575125     |
| protected        | False                                |
| size             | 2147483648                           |
| status           | active                               |
| updated_at       | 2016-04-29T05:00:02.000000           |
| virtual_size     | None                                 |
+------------------+--------------------------------------+
+----------------------------+--------------------------------------+
| Property                   | Value                                |
+----------------------------+--------------------------------------+
| Property 'architecture'    | x86_64                               |
| Property 'hw_disk_bus'     | virtio                               |
| Property 'hw_vif_model'    | virtio                               |
| Property 'hypervisor_type' | kvm                                  |
| Property 'os_distro'       | rhel                                 |
| Property 'os_type'         | linux                                |
| Property 'os_version'      | 7                                    |
| Property 'vm_mode'         | hvm                                  |
| checksum                   | a981130cf2b7e09f4686dc273cf7187e     |
| container_format           | bare                                 |
| created_at                 | 2016-04-29T04:59:40.000000           |
| deleted                    | False                                |
| deleted_at                 | None                                 |
| disk_format                | raw                                  |
| id                         | 31f210cd-5b37-4943-b427-0d7f94c6e0aa |
| is_public                  | False                                |
| min_disk                   | 0                                    |
| min_ram                    | 2060                                 |
| name                       | kean-disk2                           |
| owner                      | 6c4dac53186d44fcbac29d3f3f575125     |
| protected                  | False                                |
| size                       | 2147483648                           |
| status                     | active                               |
| updated_at                 | 2016-04-29T05:00:03.000000           |
| virtual_size               | None                                 |
+----------------------------+--------------------------------------+
[1107.5] Finishing off

Scenario2:Convert multidisks guest which has windows os from esx6.0 to openstack 
Scenario3:Convert multidisks guest which has linux os from XEN to openstack
Scenario4:Convert multidisks guest which has windows os from XEN to openstack
Scenario5:Convert multidisks guest which has linux os from KVM to openstack 
Scenario6:Convert multidisks guest which has windows os from KVM to openstack

7.After conversion, check the result on openstack dashboard
 Login the openstack dashboard
7.1 Check all disk which belong to the guest has list the image interface  
7.2 Make sure the guest can be boot successfully on openstack 
7.3 Create the other additional disks as volume 
7.4 Add volumes which created by step2.4 to instance which is you just converted 
7.5 Make sure the instance is normal and the new added volumes could be used in OS
7.6 Check the guest whether or not meet checkpoint 

Result now:
As above all scenarios can be converted successfully and checking conversion result at openstack is passed,virt-v2v can copy additional disks to Glance
So move the bug from ON_QA to VERIFIED
Comment 21 errata-xmlrpc 2016-11-03 13:58:02 EDT
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/RHSA-2016-2576.html

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