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

2017-03-30 Thread Shahar Havivi
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 
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
>
>
>  9e2f7338-9f13-32db-ea50-d6d9467e1345
>   2097152
>   2097152
>   2
>   
> hvm
> 
>   
>   
> 
> 
> 
>   
>   
>   destroy
>   restart
>   restart
>   
> /usr/libexec/qemu-kvm
> 
>   
>   
>   
>   
> 
> 
>function='0x2'/>
> 
> 
>function='0x1'/>
> 
> 
>   
>   
>   
>function='0x0'/>
> 
> 
>   
> 
> 
>   
> 
> 
> 
> 
>function='0x0'/>
> 
> 
>   
>function='0x0'/>
> 
> 
>function='0x0'/>
> 
>   
>
>
>
>
>
>
> On Thu, Mar 30, 2017 at 12:16 PM, Shahar Havivi 
> 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 
>> 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 
>>> 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 
 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@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 <
> pradeepan...@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

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

2017-03-30 Thread Pradeep Antil
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


 9e2f7338-9f13-32db-ea50-d6d9467e1345
  2097152
  2097152
  2
  
hvm

  
  



  
  
  destroy
  restart
  restart
  
/usr/libexec/qemu-kvm

  
  
  
  


  


  


  
  
  
  


  


  




  


  
  


  

  






On Thu, Mar 30, 2017 at 12:16 PM, Shahar Havivi  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 
> 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 
>> 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 
>>> 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@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  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.
>

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

2017-03-30 Thread Shahar Havivi
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 
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 
> 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 
>> 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@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 
>>> 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.vdsbroker.vdsbroker.VdsBrokerCommand.c
 reateDefaultConcreteException(VdsBrokerCommand.java:76)
 [vdsbroker.jar:]
 at org.ovirt.engine.core.vdsbroker.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@lplinnd1hypov13 ~]# virsh -c qemu+ssh://root@
 /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@ovirt.org
 http://lists.ovirt.org/mailman/listinfo/users


>>>
>>
>>
>> --
>> Best Regards
>> Pradeep Kumar
>>
>
>
>
> --
> Best Regards
> Pradeep Kumar
>
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


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

2017-03-30 Thread Pradeep Antil
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 
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  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@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 
>> 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.vdsbroker.vdsbroker.VdsBrokerCommand.c
>>> reateDefaultConcreteException(VdsBrokerCommand.java:76) [vdsbroker.jar:]
>>> at org.ovirt.engine.core.vdsbroker.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@lplinnd1hypov13 ~]# virsh -c qemu+ssh://root@/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@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>>>
>>
>
>
> --
> Best Regards
> Pradeep Kumar
>



-- 
Best Regards
Pradeep Kumar
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread Richard W.M. Jones
On Sun, Dec 20, 2015 at 02:05:30PM +0100, ov...@timmi.org wrote:
> >>>./import-to-ovirt.pl: no operating system was found on the disk

Looks like you need to install either libguestfs-winsupport (assuming
the host is RHEL/CentOS), because this is required to process any
Windows disk images.

libguestfs-winsupport can be found here for RHEL < 7.2:

  https://people.redhat.com/~rjones/libguestfs-winsupport/

and is included in the base OS in RHEL >= 7.2.

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/
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread Yedidyah Bar David
On Sun, Dec 20, 2015 at 12:59 PM,   wrote:
> Hi,
>
> thank you for the quick response.
>
> Yes I can confirm that I'm also able to perform this through copying of the
> image but then you need to know the exact file name of the disk you need to
> overwrite.
>
> Is there a way to see the file name also in the oVirt admin portal?

If you check the "Disks" tab, you'll see there an ID tab.

For nfs/qcow, that's a directory name to be found under 'images'
inside the storage domain. Under this directory you'll find several
files (data, metadata and lease) per each snapshot of this disk.
Not sure any of this is documented and/or intended for direct
manipulation.

Best,

>
> Best regards
> Christoph
>
>
>
> Am 20.12.2015 um 11:24 schrieb Yedidyah Bar David:
>>
>> On Sun, Dec 20, 2015 at 12:13 PM,   wrote:
>>>
>>> Hi list,
>>>
>>> finally I managed to install oVirt on my new server and so far it is
>>> really
>>> great.
>>>
>>> The next step on my side it to migrate VMs from another server
>>> (KVM/libvirtd/virt-manager) to oVirt.
>>> I was trying to find something in the documentation but so far no luck.
>>>
>>> Google was pointing me to tow options:
>>>
>>> - virt-v2v
>>> - import-to-ovirt.pl (script from Richard WM Jones)
>>>
>>>
>>> Currently I'm trying to migrate a Win7 VM (with VirtIO) with
>>> import_to_ovirt
>>> bzt I receive the following error message:
>>> ./import-to-ovirt.pl: no operating system was found on the disk
>>>
>>> I'm executing the following command:
>>> ./import-to-ovirt.pl /path-to-image-file/disk.img hostname:/export-domain
>>>
>>> Is anyone able to support me here?
>>> As both systems are running KVM there should be a quite easy way to
>>> migrate
>>> the VMs or not?
>>
>> Adding Richard.
>>
>> IIRC people managed to do that by merely creating a new vm and copying the
>> existing one over the new empty disk. No idea about details, you might
>> want
>> to search the list archives.
>>
>> Best,
>
>



-- 
Didi
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread ovirt

Hi Rich,

the host is a CentOS (latest).

libguestfs-winsupport

root@lxedna import-to-ovirt-7edfc4e]# rpm -qa | grep -i 
libguestfs-winsupport

libguestfs-winsupport-7.2-1.el7.x86_64

Best regards
Christoph

Am 20.12.2015 um 14:12 schrieb Richard W.M. Jones:

On Sun, Dec 20, 2015 at 02:05:30PM +0100, ov...@timmi.org wrote:

./import-to-ovirt.pl: no operating system was found on the disk

Looks like you need to install either libguestfs-winsupport (assuming
the host is RHEL/CentOS), because this is required to process any
Windows disk images.

libguestfs-winsupport can be found here for RHEL < 7.2:

   https://people.redhat.com/~rjones/libguestfs-winsupport/

and is included in the base OS in RHEL >= 7.2.

Rich.



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread ovirt

Hi Rich,

wow that was fast!!!
This is working great

Best regards and merry Christmas
Christoph

Am 20.12.2015 um 18:02 schrieb Richard W.M. Jones:

On Sun, Dec 20, 2015 at 02:15:21PM +0100, ov...@timmi.org wrote:

Hi Rich,

the host is a CentOS (latest).

libguestfs-winsupport

root@lxedna import-to-ovirt-7edfc4e]# rpm -qa | grep -i
libguestfs-winsupport
libguestfs-winsupport-7.2-1.el7.x86_64

Right, sorry, that's a bug in import-to-ovirt.  I've just pushed
a fix to the git repo.

Thanks for your patience!

Rich.



___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread ovirt

Hi Richard,

please find the output in the attachment.

Best regards and thank you for your support
Christoph

Am 20.12.2015 um 12:51 schrieb Richard W.M. Jones:

On Sun, Dec 20, 2015 at 12:24:08PM +0200, Yedidyah Bar David wrote:

On Sun, Dec 20, 2015 at 12:13 PM,   wrote:

Hi list,

finally I managed to install oVirt on my new server and so far it is really
great.

The next step on my side it to migrate VMs from another server
(KVM/libvirtd/virt-manager) to oVirt.
I was trying to find something in the documentation but so far no luck.

Google was pointing me to tow options:

- virt-v2v
- import-to-ovirt.pl (script from Richard WM Jones)


Currently I'm trying to migrate a Win7 VM (with VirtIO) with import_to_ovirt
bzt I receive the following error message:
./import-to-ovirt.pl: no operating system was found on the disk

The error means libguestfs doesn't think there is anything on your
source disk (disk.img), eg it is blank or there is no detectable
operating system on it.

Do:

   export LIBGUESTFS_DEBUG=1
   export LIBGUESTFS_TRACE=1
   ./import-to-ovirt.pl []

and capture the full output.  From that output it is possible to work
out why inspection of the source disk failed.

Rich.



[root@lxedna import-to-ovirt-7edfc4e]# ./import-to-ovirt.pl /home/IE9-Win7.img lxedna:/media/storage3
libguestfs: trace: set_verbose true
libguestfs: trace: set_verbose = 0
libguestfs: trace: set_backend "direct"
libguestfs: trace: set_backend = 0
libguestfs: create: flags = 0, handle = 0x106b510, program = perl
libguestfs: trace: set_program "import-to-ovirt.pl"
libguestfs: trace: set_program = 0
libguestfs: trace: add_drive "/home/IE9-Win7.img" "readonly:true"
libguestfs: creating COW overlay to protect original drive content
libguestfs: trace: get_tmpdir
libguestfs: trace: get_tmpdir = "/tmp"
libguestfs: trace: disk_create "/tmp/libguestfsBRjWOe/overlay1" "qcow2" -1 "backingfile:/home/IE9-Win7.img"
libguestfs: command: run: qemu-img
libguestfs: command: run: \ create
libguestfs: command: run: \ -f qcow2
libguestfs: command: run: \ -o backing_file=/home/IE9-Win7.img
libguestfs: command: run: \ /tmp/libguestfsBRjWOe/overlay1
Formatting '/tmp/libguestfsBRjWOe/overlay1', fmt=qcow2 size=53687091200 backing_file='/home/IE9-Win7.img' encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
libguestfs: trace: disk_create = 0
libguestfs: trace: add_drive = 0
libguestfs: trace: launch
libguestfs: trace: version
libguestfs: trace: version = 
libguestfs: trace: get_backend
libguestfs: trace: get_backend = "direct"
libguestfs: launch: program=import-to-ovirt.pl
libguestfs: launch: version=1.28.1rhel=7,release=1.55.el7.centos,libvirt
libguestfs: launch: backend registered: unix
libguestfs: launch: backend registered: uml
libguestfs: launch: backend registered: libvirt
libguestfs: launch: backend registered: direct
libguestfs: launch: backend=direct
libguestfs: launch: tmpdir=/tmp/libguestfsBRjWOe
libguestfs: launch: umask=0022
libguestfs: launch: euid=0
libguestfs: trace: get_backend_setting "force_tcg"
libguestfs: trace: get_backend_setting = NULL (error)
libguestfs: trace: get_cachedir
libguestfs: trace: get_cachedir = "/var/tmp"
libguestfs: [0ms] begin building supermin appliance
libguestfs: [0ms] run supermin
libguestfs: command: run: /usr/bin/supermin5
libguestfs: command: run: \ --build
libguestfs: command: run: \ --verbose
libguestfs: command: run: \ --if-newer
libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock
libguestfs: command: run: \ --copy-kernel
libguestfs: command: run: \ -f ext2
libguestfs: command: run: \ --host-cpu x86_64
libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d
libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d
supermin: version: 5.1.10
supermin: rpm: detected RPM version 4.11
supermin: package handler: fedora/rpm
supermin: acquiring lock on /var/tmp/.guestfs-0/lock
supermin: build: /usr/lib64/guestfs/supermin.d
supermin: build: visiting /usr/lib64/guestfs/supermin.d/base.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/daemon.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/excludefiles type uncompressed excludefiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/hostfiles type uncompressed hostfiles
supermin: build: visiting /usr/lib64/guestfs/supermin.d/init.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/packages type uncompressed packages
supermin: build: visiting /usr/lib64/guestfs/supermin.d/udev-rules.tar.gz type gzip base image (tar)
supermin: build: visiting /usr/lib64/guestfs/supermin.d/zz-winsupport.tar.gz type gzip base image (tar)
supermin: build: 184 packages, including dependencies
supermin: build: 30887 files
supermin: build: 17708 files, after removing unreadable files
supermin: build: 9033 files, after matching excludefiles
supermin: build: 9038 files, after adding hostfiles
supermin: 

Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread Yedidyah Bar David
On Sun, Dec 20, 2015 at 12:13 PM,   wrote:
> Hi list,
>
> finally I managed to install oVirt on my new server and so far it is really
> great.
>
> The next step on my side it to migrate VMs from another server
> (KVM/libvirtd/virt-manager) to oVirt.
> I was trying to find something in the documentation but so far no luck.
>
> Google was pointing me to tow options:
>
> - virt-v2v
> - import-to-ovirt.pl (script from Richard WM Jones)
>
>
> Currently I'm trying to migrate a Win7 VM (with VirtIO) with import_to_ovirt
> bzt I receive the following error message:
> ./import-to-ovirt.pl: no operating system was found on the disk
>
> I'm executing the following command:
> ./import-to-ovirt.pl /path-to-image-file/disk.img hostname:/export-domain
>
> Is anyone able to support me here?
> As both systems are running KVM there should be a quite easy way to migrate
> the VMs or not?

Adding Richard.

IIRC people managed to do that by merely creating a new vm and copying the
existing one over the new empty disk. No idea about details, you might want
to search the list archives.

Best,
-- 
Didi
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread ovirt

Hi,

thank you for the quick response.

Yes I can confirm that I'm also able to perform this through copying of 
the image but then you need to know the exact file name of the disk you 
need to overwrite.


Is there a way to see the file name also in the oVirt admin portal?

Best regards
Christoph


Am 20.12.2015 um 11:24 schrieb Yedidyah Bar David:

On Sun, Dec 20, 2015 at 12:13 PM,   wrote:

Hi list,

finally I managed to install oVirt on my new server and so far it is really
great.

The next step on my side it to migrate VMs from another server
(KVM/libvirtd/virt-manager) to oVirt.
I was trying to find something in the documentation but so far no luck.

Google was pointing me to tow options:

- virt-v2v
- import-to-ovirt.pl (script from Richard WM Jones)


Currently I'm trying to migrate a Win7 VM (with VirtIO) with import_to_ovirt
bzt I receive the following error message:
./import-to-ovirt.pl: no operating system was found on the disk

I'm executing the following command:
./import-to-ovirt.pl /path-to-image-file/disk.img hostname:/export-domain

Is anyone able to support me here?
As both systems are running KVM there should be a quite easy way to migrate
the VMs or not?

Adding Richard.

IIRC people managed to do that by merely creating a new vm and copying the
existing one over the new empty disk. No idea about details, you might want
to search the list archives.

Best,


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread ovirt

got it.
Thank you so much.


Am 20.12.2015 um 12:19 schrieb Yedidyah Bar David:

On Sun, Dec 20, 2015 at 12:59 PM,   wrote:

Hi,

thank you for the quick response.

Yes I can confirm that I'm also able to perform this through copying of the
image but then you need to know the exact file name of the disk you need to
overwrite.

Is there a way to see the file name also in the oVirt admin portal?

If you check the "Disks" tab, you'll see there an ID tab.

For nfs/qcow, that's a directory name to be found under 'images'
inside the storage domain. Under this directory you'll find several
files (data, metadata and lease) per each snapshot of this disk.
Not sure any of this is documented and/or intended for direct
manipulation.

Best,


Best regards
Christoph



Am 20.12.2015 um 11:24 schrieb Yedidyah Bar David:

On Sun, Dec 20, 2015 at 12:13 PM,   wrote:

Hi list,

finally I managed to install oVirt on my new server and so far it is
really
great.

The next step on my side it to migrate VMs from another server
(KVM/libvirtd/virt-manager) to oVirt.
I was trying to find something in the documentation but so far no luck.

Google was pointing me to tow options:

- virt-v2v
- import-to-ovirt.pl (script from Richard WM Jones)


Currently I'm trying to migrate a Win7 VM (with VirtIO) with
import_to_ovirt
bzt I receive the following error message:
./import-to-ovirt.pl: no operating system was found on the disk

I'm executing the following command:
./import-to-ovirt.pl /path-to-image-file/disk.img hostname:/export-domain

Is anyone able to support me here?
As both systems are running KVM there should be a quite easy way to
migrate
the VMs or not?

Adding Richard.

IIRC people managed to do that by merely creating a new vm and copying the
existing one over the new empty disk. No idea about details, you might
want
to search the list archives.

Best,







___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread Richard W.M. Jones
On Sun, Dec 20, 2015 at 12:24:08PM +0200, Yedidyah Bar David wrote:
> On Sun, Dec 20, 2015 at 12:13 PM,   wrote:
> > Hi list,
> >
> > finally I managed to install oVirt on my new server and so far it is really
> > great.
> >
> > The next step on my side it to migrate VMs from another server
> > (KVM/libvirtd/virt-manager) to oVirt.
> > I was trying to find something in the documentation but so far no luck.
> >
> > Google was pointing me to tow options:
> >
> > - virt-v2v
> > - import-to-ovirt.pl (script from Richard WM Jones)
> >
> >
> > Currently I'm trying to migrate a Win7 VM (with VirtIO) with import_to_ovirt
> > bzt I receive the following error message:
> > ./import-to-ovirt.pl: no operating system was found on the disk

The error means libguestfs doesn't think there is anything on your
source disk (disk.img), eg it is blank or there is no detectable
operating system on it.

Do:

  export LIBGUESTFS_DEBUG=1
  export LIBGUESTFS_TRACE=1
  ./import-to-ovirt.pl []

and capture the full output.  From that output it is possible to work
out why inspection of the source disk failed.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
Fedora Windows cross-compiler. Compile Windows programs, test, and
build Windows installers. Over 100 libraries supported.
http://fedoraproject.org/wiki/MinGW
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Import KVM/libvirt VMs to oVirt

2015-12-20 Thread Richard W.M. Jones
On Sun, Dec 20, 2015 at 02:15:21PM +0100, ov...@timmi.org wrote:
> Hi Rich,
> 
> the host is a CentOS (latest).
> 
> libguestfs-winsupport
> 
> root@lxedna import-to-ovirt-7edfc4e]# rpm -qa | grep -i
> libguestfs-winsupport
> libguestfs-winsupport-7.2-1.el7.x86_64

Right, sorry, that's a bug in import-to-ovirt.  I've just pushed
a fix to the git repo.

Thanks for your patience!

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/
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users