[ovirt-users] Ovirt python API clone VM to other data domain

Algirdas Žemaitis algirdas at host1plus.com
Mon Jan 18 14:39:29 UTC 2016


Hello,

It seems ovirt API lacks of possibility to define storage domain, in which cloned vm (from snapshot) will be created, is it done on purpose, or it is just missing/under development ?

Scenario using WEB GUI :
Create snapshot of any running VM, right-click on snapshot, select “clone”
In pop-up window you can enter new VM name etc, under “resource allocation” section *you can select where it will be created*


Scenario using python-sdk/ovirt-api

I was trying to create vm for example like this:
##
vm_params = params.VM(name=vm_from_list + '__bak', cluster=api.clusters.get("Default"), storage_domain=api.storagedomains.get("temp"), memory=vm.get_memory(), snapshots=snapshots_param)
api.vms.add(vm_params)
##
# temp is „other“ storage domain, NFS v3
VM will be still created on same storage as original VM, no matter what domain I will define in params...
Also tried other variations, using templates, disk profiles and so on, but nothing has changed where new VM is created.

I know cloning is not intended for backup purpose, but it is workaround probably half of Ovirt users use.
In my case, it is not very smart to do snapshot and create VM (allocate disk space, etc) on same storage domain where there is already running a lot of VMs, environment is already busy.

Thanks !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20160118/2d278ea7/attachment-0001.html>


More information about the Users mailing list