[Libguestfs] virt-v2v import from KVM without storage-pool ?

Ming Xie mxie at redhat.com
Mon Jul 10 04:22:27 UTC 2017


Hi Matthias,

   I have filed the bug for this problem, you could track this problem via https://bugzilla.redhat.com/show_bug.cgi?id=1468944,thanks for you found this problem!


Hi rjones,
  
   I think bug 1468509 is a different problem with bug 1468944, bug 1468509 is due to vdsm can't recognize volume disk, but 1468944 is caused by guest's file disk not listed in storage pool.


Regards
Ming Xie


----- Original Message -----
From: "Matthias Leopold" <matthias.leopold at meduniwien.ac.at>
To: "Ming Xie" <mxie at redhat.com>
Cc: "Tomáš Golembiovský" <tgolembi at redhat.com>, "Richard W.M. Jones" <rjones at redhat.com>, "users" <users at ovirt.org>, libguestfs at redhat.com
Sent: Friday, July 7, 2017 8:01:54 PM
Subject: Re: [Libguestfs] virt-v2v import from KVM without storage-pool ?

thanks for caring about this.

Ming Xie, are you opening this BZ bug?

thanks
matthias

Am 2017-07-07 um 13:31 schrieb Tomáš Golembiovský:
> Hi,
> 
> yes it is an issue in VDSM. We count on the disks being in storage pool
> (except for block devices).
> 
> Can you open a BZ bug for that please.
> 
> Thanks,
> 
>      Tomas
> 
> 
> On Fri, 7 Jul 2017 02:52:26 -0400 (EDT)
> Ming Xie <mxie at redhat.com> wrote:
> 
>> I could reproduce customer's problem
>>
>> Packages:
>> rhv:4.1.3-0.1.el7
>> vdsm-4.19.20-1.el7ev.x86_64
>> virt-v2v-1.36.3-6.el7.x86_64
>> libguestfs-1.36.3-6.el7.x86_64
>>
>> Steps:
>> 1.Prepare a guest which is not listed storage pool
>> # virsh dumpxml avocado-vt-vm1
>> ....
>>     <disk type='file' device='disk'>
>>        <driver name='qemu' type='qcow2'/>
>>        <source file='/root/RHEL-7.3-x86_64-latest.qcow2'/>
>>        <target dev='vda' bus='virtio'/>
>>        <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
>>      </disk>
>> .....
>> 2.Try to import this guest in rhv4.1 from KVM host but failed to import the guest as screenshot and get error info from vdsm.log
>> ....
>> 2017-07-07 14:41:22,176+0800 ERROR (jsonrpc/6) [root] Error getting disk size (v2v:1089)
>> Traceback (most recent call last):
>>    File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1078, in _get_disk_info
>>      vol = conn.storageVolLookupByPath(disk['alias'])
>>    File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4555, in storageVolLookupByPath
>>      if ret is None:raise libvirtError('virStorageVolLookupByPath() failed', conn=self)
>> libvirtError: Storage volume not found: no storage vol with matching path '/root/RHEL-7.3-x86_64-latest.qcow2'
>> ....
>>
>>
>> 3.Try to convert this guest to rhv by virt-v2v on v2v conversion server,could import the guest from export domain to data domain on rhv4.1 after finishing conversion
>> # virt-v2v avocado-vt-vm1 -o rhv -os 10.73.131.93:/home/nfs_export
>> [   0.0] Opening the source -i libvirt avocado-vt-vm1
>> [   0.0] Creating an overlay to protect the source from being modified
>> [   0.4] Initializing the target -o rhv -os 10.73.131.93:/home/nfs_export
>> [   0.7] Opening the overlay
>> [   6.1] Inspecting the overlay
>> [  13.8] Checking for sufficient free disk space in the guest
>> [  13.8] Estimating space required on target for each disk
>> [  13.8] Converting Red Hat Enterprise Linux Server 7.3 (Maipo) to run on KVM
>> virt-v2v: This guest has virtio drivers installed.
>> [  52.2] Mapping filesystem data to avoid copying unused and blank areas
>> [  52.4] Closing the overlay
>> [  52.7] Checking if the guest needs BIOS or UEFI to boot
>> [  52.7] Assigning disks to buses
>> [  52.7] Copying disk 1/1 to /tmp/v2v.Zzc4KD/c9cfeba7-73f8-428a-aa77-9a2a1acf0063/images/c8eb039e-3007-4e08-9580-c49da8b73d55/f76d16ea-5e66-4987-a496-8f378b127986 (qcow2)
>>      (100.00/100%)
>> [ 152.4] Creating output metadata
>> [ 152.6] Finishing off
>>
>>
>> Result:
>> So this problem is caused by vdsm or ovirt
>>
>> Regards
>> Ming Xie
>>
>> ----- Original Message -----
>> From: "Richard W.M. Jones" <rjones at redhat.com>
>> To: "Matthias Leopold" <matthias.leopold at meduniwien.ac.at>
>> Cc: users at ovirt.org, libguestfs at redhat.com
>> Sent: Wednesday, July 5, 2017 9:15:16 PM
>> Subject: Re: [Libguestfs] virt-v2v import from KVM without storage-pool ?
>>
>> On Wed, Jul 05, 2017 at 11:14:09AM +0200, Matthias Leopold wrote:
>>> hi,
>>>
>>> i'm trying to import a VM in oVirt from a KVM host that doesn't use
>>> storage pools. this fails with the following message in
>>> /var/log/vdsm/vdsm.log:
>>>
>>> 2017-07-05 09:34:20,513+0200 ERROR (jsonrpc/5) [root] Error getting
>>> disk size (v2v:1089)
>>> Traceback (most recent call last):
>>>    File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1078, in
>>> _get_disk_info
>>>      vol = conn.storageVolLookupByPath(disk['alias'])
>>>    File "/usr/lib64/python2.7/site-packages/libvirt.py", line 4770,
>>> in storageVolLookupByPath
>>>      if ret is None:raise libvirtError('virStorageVolLookupByPath()
>>> failed', conn=self)
>>> libvirtError: Storage volume not found: no storage vol with matching path
>>>
>>> the disks in the origin VM are defined as
>>>
>>>      <disk type='file' device='disk'>
>>>        <driver name='qemu' type='raw' cache='writethrough'/>
>>>        <source file='/dev/kvm108/kvm108_img'/>
>>>
>>>      <disk type='file' device='cdrom'>
>>>        <driver name='qemu' type='raw'/>
>>>        <source file='/some/path/CentOS-7-x86_64-Minimal-1611.iso'/>
>>>
>>> is this a virt-v2v or oVirt problem?
>>
>> Well the stack trace is in the oVirt code, so I guess it's an oVirt
>> problem.  Adding ovirt-users mailing list.
>>
>> Rich.
>>
>> -- 
>> Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
>> Read my programming and virtualization blog: http://rwmj.wordpress.com
>> virt-df lists disk usage of guests without needing to install any
>> software inside the virtual machine.  Supports Linux and Windows.
>> http://people.redhat.com/~rjones/virt-df/
>>
>> _______________________________________________
>> Libguestfs mailing list
>> Libguestfs at redhat.com
>> https://www.redhat.com/mailman/listinfo/libguestfs
> 
> 

-- 
Matthias Leopold
IT Systems & Communications
Medizinische Universität Wien
Spitalgasse 23 / BT 88 /Ebene 00
A-1090 Wien
Tel: +43 1 40160-21241
Fax: +43 1 40160-921200




More information about the Libguestfs mailing list