Re: [ovirt-users] [Libguestfs] virt-v2v import from KVM without storage-pool ?

2017-07-09 Thread Ming Xie
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.leop...@meduniwien.ac.at>
To: "Ming Xie" <m...@redhat.com>
Cc: "Tomáš Golembiovský" <tgole...@redhat.com>, "Richard W.M. Jones" 
<rjo...@redhat.com>, "users" <users@ovirt.org>, libgues...@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 <m...@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
>> 
>> 
>>
>>
>>
>>> function='0x0'/>
>>  
>> .
>> 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" <rjo...@redhat.com>
>> To: "Matthias Leopold" <matthias.leop...@meduniwien.ac.at>
>> Cc: users@ovirt.org, libgues...@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) [

Re: [ovirt-users] [Libguestfs] virt-v2v import from KVM without storage-pool ?

2017-07-07 Thread Ming Xie
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

   
  
  
  
  

.
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" <rjo...@redhat.com>
To: "Matthias Leopold" <matthias.leop...@meduniwien.ac.at>
Cc: users@ovirt.org, libgues...@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
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 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
libgues...@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
2017-07-07 14:41:10,345+08 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmsNamesFromExternalProviderVDSCommand] (default task-8) [f8166d03-f053-4832-8833-aa39142385a5] START, GetVmsNamesFromExternalProviderVDSCommand(HostName = 10.66.144.40, GetVmsFromExternalProviderParameters:{runAsync='true', hostId='5081b809-0779-41ba-9c86-a01049e41ed4', url='qemu+tcp://10.66.4.242/system', username='root', originType='KVM', namesOfVms='null'}), log id: f703286
2017-07-07 14:41:11,412+08 INFO  [org.ovirt.engine.core.vdsbroker.vdsbroker.GetVmsNamesFromExternalProviderVDSCommand] (default task-8) [f8166d03-f053-4832-8833-aa39142385a5] FINISH, GetVmsNamesFromExternalProviderVDSCommand, return: [VM [rhel7.4-v2v], VM [win10-v2v], VM [avocado-vt-vm1], VM [win2k12-file-virtio], VM [rhel7.4-

Re: [ovirt-users] [Libguestfs] virt-v2v import from KVM without storage-pool ?

2017-07-07 Thread Ming Xie
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

   
  
  
  
  

.
2.Try to import this guest in rhv4.1 from KVM host but failed to import the 
guest 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" <rjo...@redhat.com>
To: "Matthias Leopold" <matthias.leop...@meduniwien.ac.at>
Cc: users@ovirt.org, libgues...@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
> 
> 
>   
>   
> 
> 
>   
>   
> 
> 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
libgues...@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users