[Users] api question / create vm from template
Michael Pasternak
mpastern at redhat.com
Tue Apr 9 07:52:10 UTC 2013
Hi Alex,
On 04/04/2013 10:40 PM, Alex Leonhardt wrote:
> and via the python api ?
- to clone vm from template in python sdk do:
vm_params_holder = params.VM(disks=params.Disks(clone=True), ...)
api.vms.add(vm_params_holder)
- to create vm with pre-allocated disk/s, you can modify disk/s config
during creation of vm by:
template = api.templates.get(name="xxx")
template_disks = template.disks.list()
for disk in template_disks:
#modify disk config here
vm_params_holder = params.VM(disks=params.Disks(disk=template_disks))
api.vms.add(vm_params_holder)
>
> On 04/04/2013 12:41 PM, Dafna Ron wrote:
>> Resource allocation tab will allow you to choose between thin provision and clone.
>>
>>
>> On 04/04/2013 01:03 PM, Alex Leonhardt wrote:
>>> hi,
>>>
>>> i've been successful in creating a VM from a template, however, that VM is a thin-provisioned one ? is it possible to make it a cloned / pre-provisioned ? otherwise i
>>> wont be able to update/remove the template when i need to ?
>>>
>>> this is on ovirt 3.1
>>>
>>> thanks
>>> alex
>>>
>>> --
>>> | RHCE | Sen Sys Engineer / Platform Architect | www.vcore.co <http://www.vcore.co> | www.vsearchcloud.com <http://www.vsearchcloud.com> |
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>
>>
>
>
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
--
Michael Pasternak
RedHat, ENG-Virtualization R&D
More information about the Users
mailing list