[ovirt-users] Import KVM/libvirt VMs to oVirt 4.1 with External Provider

Shahar Havivi shavivi at redhat.com
Thu Mar 30 07:29:53 UTC 2017


When we try to do:
vol = conn.storageVolLookupByPath(disk['alias'])
e.g:
vol = conn.storageVolLookupByPath('/opt/wiki-uat/mediawiki-uat.img')
Libvirt raise an error:
"libvirtError: Storage volume not found: no storage vol with matching path"

e.g.: '/opt/wiki-uat/mediawiki-uat.img' is not exists
Please look if the path exists (via the host that the Libvirt Domains
exists).

 Shahar.

On Thu, Mar 30, 2017 at 10:19 AM, Pradeep Antil <pradeepantil at gmail.com>
wrote:

> Hi Shahar ,
>
> vdsm shows the following errors.
>
> Just giving the background how do we created VMs in KVM,  All the VMs are
> created on separate Luns of 100 GB and before creating VMs in KVM we
> usually format the LUN and then we create VMs on the formatted Lun.In this
> case we have mount the formatted Lun under "/opt/wiki-uat".
>
> I am just curious to know , will this type of VMs can be imported in Ovirt.
>
>
> 2017-03-30 12:30:17,999+0530 INFO  (jsonrpc/7) [jsonrpc.JsonRpcServer] RPC
> call Host.getStats succeeded in 0.02 seconds (__init__:515)
> 2017-03-30 12:30:19,366+0530 INFO  (jsonrpc/4) [throttled] Current
> getAllVmStats: {} (throttledlog:105)
> 2017-03-30 12:30:19,367+0530 INFO  (jsonrpc/4) [jsonrpc.JsonRpcServer] RPC
> call Host.getAllVmStats succeeded in 0.00 seconds (__init__:515)
> 2017-03-30 12:30:20,028+0530 ERROR (jsonrpc/6) [root] Error getting disk
> size (v2v:1084)
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/site-packages/vdsm/v2v.py", line 1073, 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
> 2017-03-30 12:30:20,029+0530 WARN  (jsonrpc/6) [root] Cannot add VM
> wiki-uat due to disk storage error (v2v:1015)
> 2017-03-30 12:30:20,034+0530 INFO  (jsonrpc/6) [jsonrpc.JsonRpcServer] RPC
> call Host.getExternalVMs succeeded in 0.48 seconds (__init__:515)
>
> Below are the contents of VM libvirt xml file
>
>
>  <uuid>9e2f7338-9f13-32db-ea50-d6d9467e1345</uuid>
>   <memory unit='KiB'>2097152</memory>
>   <currentMemory unit='KiB'>2097152</currentMemory>
>   <vcpu placement='static'>2</vcpu>
>   <os>
>     <type arch='x86_64' machine='rhel6.5.0'>hvm</type>
>     <boot dev='hd'/>
>   </os>
>   <features>
>     <acpi/>
>     <apic/>
>     <pae/>
>   </features>
>   <clock offset='utc'/>
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>restart</on_reboot>
>   <on_crash>restart</on_crash>
>   <devices>
>     <emulator>/usr/libexec/qemu-kvm</emulator>
>     <disk type='file' device='disk'>
>       <driver name='qemu' type='raw' cache='none'/>
>       <source file='/opt/wiki-uat/mediawiki-uat.img'/>
>       <target dev='hda' bus='ide'/>
>       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
>     </disk>
>     <controller type='usb' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x2'/>
>     </controller>
>     <controller type='ide' index='0'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x01'
> function='0x1'/>
>     </controller>
>     <interface type='bridge'>
>       <mac address='52:54:00:0a:fb:e2'/>
>       <source bridge='br10'/>
>       <model type='e1000'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x03'
> function='0x0'/>
>     </interface>
>     <serial type='pty'>
>       <target port='0'/>
>     </serial>
>     <console type='pty'>
>       <target type='serial' port='0'/>
>     </console>
>     <input type='mouse' bus='ps2'/>
>     <graphics type='vnc' port='-1' autoport='yes'/>
>     <sound model='ich6'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
> function='0x0'/>
>     </sound>
>     <video>
>       <model type='cirrus' vram='9216' heads='1'/>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x02'
> function='0x0'/>
>     </video>
>     <memballoon model='virtio'>
>       <address type='pci' domain='0x0000' bus='0x00' slot='0x05'
> function='0x0'/>
>     </memballoon>
>   </devices>
>
>
>
>
>
>
> On Thu, Mar 30, 2017 at 12:16 PM, Shahar Havivi <shavivi at redhat.com>
> wrote:
>
>> Sorry for the miss leading message, its suppose to say that some of the
>> selected VMs cannot be imported.
>> This can be due to broken storage disk path or any other Libvirt parsing
>> error.
>> For more details you can look at the vdsm log (/var/log/vdsm/vdsm.log)
>> and see why we failed to parse Libvirt xml for each VM that is not in the
>> right list.
>>
>> On Thu, Mar 30, 2017 at 9:34 AM, Pradeep Antil <pradeepantil at gmail.com>
>> wrote:
>>
>>> Hi Team,
>>>
>>> While importing VMs with external Provider KVM on my oVirt setup, i am
>>> getting the below error:
>>>
>>> "All chosen VMs couldn't be retrieved by the external system and
>>> therefore have been filtered. Please see log for details.
>>>
>>> As per Shahar suggestion yesterday i was able to view the virtual
>>> machine of my KVM hypervisior in oVirt Portal.I have also created the
>>> export domain in my DC as well.
>>>
>>> Any idea how to resolve this issue and so that i can start importing VMs
>>>
>>>
>>> [image: Inline image 1]
>>>
>>> Thanks in Advance
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Mar 29, 2017 at 6:17 PM, Pradeep Antil <pradeepantil at gmail.com>
>>> wrote:
>>>
>>>> Hi Shahar,
>>>>
>>>> Thanks for the quick response. Issue is resolved now with your
>>>> suggested steps.
>>>>
>>>> Thank you very much !!!!
>>>>
>>>>
>>>>
>>>> On Wed, Mar 29, 2017 at 5:38 PM, Shahar Havivi <shavivi at redhat.com>
>>>> wrote:
>>>>
>>>>> when you run virsh you where logged in as root user,
>>>>> the user that oVirt is running is vdsm
>>>>>
>>>>> you need to run:
>>>>> $ sudo -u vdsm ssh-keygen
>>>>> $ sudo -u vdsm ssh-copy-id user at kvmhost
>>>>>
>>>>> you can look at wiki we have for Xen to generate the ssh keys but its
>>>>> the same for kvm.
>>>>> https://www.ovirt.org/develop/release-management/features/vi
>>>>> rt/XenToOvirt/
>>>>>
>>>>>  Shahar.
>>>>>
>>>>> On Wed, Mar 29, 2017 at 12:34 PM, Pradeep Antil <
>>>>> pradeepantil at gmail.com> wrote:
>>>>>
>>>>>>
>>>>>> Hello Folks,
>>>>>>
>>>>>> I am trying to import KVM guest VMs to my oVirt Server using external
>>>>>> Provider. But when i add external provider with type KVM and do the testing
>>>>>> that time i am getting below error
>>>>>>
>>>>>> Caused by: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException:
>>>>>> VDSGenericException: VDSErrorException: Failed to
>>>>>> GetVmsNamesFromExternalProviderVDS, error = Cannot recv data: Host
>>>>>> key verification failed.: Connection reset by peer, code = 65
>>>>>>         at org.ovirt.engine.core.vdsbroke
>>>>>> r.vdsbroker.VdsBrokerCommand.createDefaultConcreteException(VdsBrokerCommand.java:76)
>>>>>> [vdsbroker.jar:]
>>>>>>         at org.ovirt.engine.core.vdsbroke
>>>>>> r.vdsbroker.BrokerCommandBase.createException(BrokerCommandBase.java:222)
>>>>>> [vdsbroker.jar:]
>>>>>>
>>>>>>
>>>>>> [image: Inline image 2]
>>>>>>
>>>>>> I have already configure password less authentication with ssh keys
>>>>>> between proxy host to my KVM hypervisor. Though i can reach to kvm
>>>>>> hypervisor with virsh connect.
>>>>>>
>>>>>> [root at lplinnd1hypov13 ~]# virsh -c qemu+ssh://root@<KVM-HYP-NAME>
>>>>>> /system
>>>>>> Welcome to virsh, the virtualization interactive terminal.
>>>>>>
>>>>>> Type:  'help' for help with commands
>>>>>>        'quit' to quit
>>>>>>
>>>>>> virsh #
>>>>>>
>>>>>> Any idea how to resolve this issue, so that i can add KVM as external
>>>>>> provider and  start importing my KVM guest VMs in ovirt setup
>>>>>>
>>>>>>
>>>>>> Thanks in Advance
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Best Regards
>>>>>> Pradeep Kumar
>>>>>>
>>>>>> _______________________________________________
>>>>>> Users mailing list
>>>>>> Users at ovirt.org
>>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Best Regards
>>>> Pradeep Kumar
>>>>
>>>
>>>
>>>
>>> --
>>> Best Regards
>>> Pradeep Kumar
>>>
>>
>>
>
>
> --
> Best Regards
> Pradeep Kumar
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170330/60730161/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 25917 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170330/60730161/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 16624 bytes
Desc: not available
URL: <http://lists.ovirt.org/pipermail/users/attachments/20170330/60730161/attachment-0003.png>


More information about the Users mailing list