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

Juan Hernández jhernand at redhat.com
Mon Jan 18 10:36:55 EST 2016


On 01/18/2016 03:39 PM, Algirdas Žemaitis wrote:
> 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 !
> 

See here:

http://lists.ovirt.org/pipermail/users/2016-January/037321.html

-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.


More information about the Users mailing list