[ovirt-users] How to create a vm cloned independent from python sdk
Amedeo Salvati
amedeo at oscert.net
Thu Dec 11 08:17:29 UTC 2014
thanks!
Best regards
Amedeo Salvati
Da "Juan Hernández" jhernand at redhat.com
A "Amedeo Salvati" amedeo at oscert.net, users at ovirt.org
Cc
Data Wed, 10 Dec 2014 19:12:31 +0100
Oggetto Re: [ovirt-users] How to create a vm cloned independent from python sdk
> On 12/10/2014 05:11 PM, Amedeo Salvati wrote:
> > Hello all,
> >
> > I'm trying to create a new VM using python sdk with it's disks
> > cloned/independent and not on thin provisioning, when I create vm I use
> > template (that has a preallocated disks), and I use this code to create
> > a vm:
> >
> > api.vms.add(params.VM(name=VMNAME, memory=MEM*GB,
> > cluster=api.clusters.get(CLUSTER),
> > template=api.templates.get(templatename),
> > description='PROVA' ))
> >
> > if I use web portal I'm able to preallocate/clone disks under resource
> > allocation tab (New VM -> resource allocation), instead I can't found
> > same operations on python sdk...
> >
> > someone can let me know what params I should pass to api.vms.add to
> > clone disks?
> >
> > Best regards
> > Amedeo Salvati
> >
>
> To specify that you want to clone the disks (the default is to not clone
> them) you need an additional "disks" parameter with the "clone=True"
> attribute:
>
> api.vms.add(
> params.VM(
> vmname=VMNAME,
> memory=MEM*GB,
> cluster=...,
> template=...,
> description=...,
> disks=params.Disks(
> clone=True
> )
> )
> )
>
> --
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20141211/43bc5641/attachment-0001.html>
More information about the Users
mailing list