Bug 803629 - Convert VM with image pointing to host's partition,virt-v2v error:cannot handle volumes of format none
Convert VM with image pointing to host's partition,virt-v2v error:cannot hand...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virt-v2v (Show other bugs)
6.3
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Matthew Booth
Virtualization Bugs
:
: 831440 (view as bug list)
Depends On:
Blocks: 785926
  Show dependency treegraph
 
Reported: 2012-03-15 05:57 EDT by tingting zheng
Modified: 2013-02-21 05:59 EST (History)
6 users (show)

See Also:
Fixed In Version: virt-v2v-0.8.9-1.el6
Doc Type: Bug Fix
Doc Text:
Cause: When reading a libvirt guest, virt-v2v uses libvirt metadata to determine the on-disk format used by the guest. However, this data is only meaningful for libvirt pools of type 'dir', 'fs' and 'netfs'. If a guest used a different type of storage pool, virt-v2v would attempt to interpret this meaningless data as a format type. Consequence: virt-v2v was unable to convert libvirt guests which used storage pools of types other than 'dir', 'fs' and 'netfs'. Fix: virt-v2v now only uses volume format metadata from storage pools of type 'dir', 'fs' and 'netfs'. All other storage pools can only hold raw data, so the format is assumed to be 'raw'. Result: virt-v2v can now convert libvirt guests using any supported storage pool type.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 05:59:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot of the volume format (86.35 KB, image/png)
2012-03-15 06:00 EDT, tingting zheng
no flags Details

  None (edit)
Description tingting zheng 2012-03-15 05:57:37 EDT
Description of problem:
Convert VM with image pointing to host's partition,virt-v2v error:cannot handle volumes of format none

Version-Release number of selected component (if applicable):
virt-v2v-0.8.7-4.el6.x86_64
libvirt-0.9.10-5.el6.x86_64
llibguestfs-1.16.8-1.el6.x86_64


How reproducible:
always

Steps to Reproduce:
1. Create new partition on host:
#fdisk /dev/sd3
Command (m for help): n
Command (m for help): w

2.Create a pool to include the partition.
# virsh pool-dumpxml dev
<pool type='disk'>
  <name>dev</name>
  <uuid>27c1cfc7-c3fe-989b-384f-ca4c7f06e2c0</uuid>
  <capacity unit='bytes'>500105249280</capacity>
  <allocation unit='bytes'>338585064960</allocation>
  <available unit='bytes'>161520152064</available>
  <source>
    <device path='/dev/sda'>
    <freeExtent start='107372805120' end='107373133824'/>
    <freeExtent start='338585425920' end='500105249280'/>
    </device>
    <format type='dos'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0700</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

# virsh vol-list dev --details
Name  Path       Type    Capacity  Allocation
---------------------------------------------
sda1  /dev/sda1  block  100.00 GB   100.00 GB
sda2  /dev/sda2  block  200.00 GB   200.00 GB
sda3  /dev/sda3  block    7.67 GB     7.67 GB
sda4  /dev/sda4  block    7.67 GB     7.67 GB

3.Create a VM based on the above partition:
    ....

    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sda3'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
   ....

4.Use virt-v2v to convert the above guest to rhevm:
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/nfs_export -n rhevm test-sda3
virt-v2v: RHEV cannot handle volumes of format none 

Also I tried with local libvirtxml,it can convert successfully.
# virt-v2v -i libvirtxml -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export -n rhevm test-sda3.xml
[====================================================================sda3: 100% 0h05m29s
virt-v2v: test-sda3 configured with virtio drivers.


Actual results:
virt-v2v error:cannot handle volumes of format none


Expected results:
virt-v2v should handle the format and convert successfully.

 
Additional info:
In virt-manager,the format of the block volume listed in pool is none,and libvirt can not handle the format of block volume,see the screenshot.
Comment 1 tingting zheng 2012-03-15 06:00:27 EDT
Created attachment 570238 [details]
screenshot of the volume format

Attached the screenshot of the volume format.
Comment 3 RHEL Product and Program Management 2012-05-03 00:37:36 EDT
Since RHEL 6.3 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.

Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 4 tingting zheng 2012-07-22 23:00:56 EDT
Find two other similar issues:
1.If add a iscsi pool,by default,the format of the volumes is lvm2,when install a guest on the volume then convert,error occurs:
virt-v2v: Failed to create storage volume: libvirt error code: 27, message: XML error: unknown volume format type lvm2

2.If add a mpath pool,by default,the format of the volumes is dos,when install a guest on the volume then convert,error occurs:
virt-v2v: Failed to create storage volume: libvirt error code: 27, message: XML error: unknown volume format type dos
Comment 5 Matthew Booth 2012-09-26 10:00:29 EDT
This is fixed upstream in commit bcd46673ca3c4259ff23c9c9954adb80f77ceacc.
Comment 7 tingting zheng 2012-10-25 05:07:03 EDT
Tested the bug with:
virt-v2v-0.8.9-2.el6.x86_64
libguestfs-1.16.32-2.el6.x86_64
libvirt-0.10.2-5.el6.x86_64

Steps:
1. Create new partition on host:
#fdisk /dev/sda2
Command (m for help): n
Command (m for help): w

2.Create a pool to include the partition.
# virsh pool-dumpxml dev
<pool type='disk'>
  <name>dev</name>
  <uuid>89cf8c8e-5a7c-fd7b-7c25-f93762a548de</uuid>
  <capacity unit='bytes'>500105249280</capacity>
  <allocation unit='bytes'>227641800704</allocation>
  <available unit='bytes'>272463416320</available>
  <source>
    <device path='/dev/sda'>
    <freeExtent start='32256' end='1048576'/>
    <freeExtent start='227642849280' end='500105249280'/>
    </device>
    <format type='unknown'/>
  </source>
  <target>
    <path>/dev</path>
    <permissions>
      <mode>0755</mode>
      <owner>-1</owner>
      <group>-1</group>
    </permissions>
  </target>
</pool>

# virsh vol-list dev --details
Name  Path       Type     Capacity  Allocation
----------------------------------------------
sda1  /dev/sda1  block  200.00 GiB  200.00 GiB
sda2  /dev/sda2  block   12.01 GiB   12.01 GiB


3.Create a VM based on the above partition:
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/sda2'/>
      <target dev='hda' bus='ide'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

4.Use virt-v2v to convert the above guest to rhevm:
# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export -n rhevm sda2-test
sda2: 100% [===========================================================================================]D 0h04m58s
virt-v2v: sda2-test configured with virtio drivers.

# virt-v2v -i libvirtxml -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export -n rhevm sda2-test.xml 
sda2: 100% [===========================================================================================]D 0h06m12s
virt-v2v: sda2-test configured with virtio drivers.

Also I use virt-v2v to convert guests which use iscsi storage and mpath storage,all works fine.
Create iscsi guest
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='none' io='native'/>
      <source dev='/dev/disk/by-path/ip-10.66.90.100:3260-iscsi-iqn.2001-05.com.equallogic:0-8a0906-8771f7d03-573263eebf54d2c2-s1-rwu-v2v-libvirt-lun-0'/>
      <target dev='hda' bus='ide'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>

# virt-v2v -o rhev -os 10.66.90.115:/vol/v2v_auto/auto_export -n rhevm iscsi-test
unit:0:0:0: 100% [=====================================================================================]D 0h10m48s
virt-v2v: iscsi-test configured with virtio drivers.

Refer to the above steps,change the bug to VERIFIED.
Comment 8 Moritoshi Oshiro 2013-01-16 03:37:46 EST
*** Bug 831440 has been marked as a duplicate of this bug. ***
Comment 10 errata-xmlrpc 2013-02-21 05:59:18 EST
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-2013-0477.html

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