[ovirt-users] Template Independent vs Dependent

Juan Hernandez jhernand at redhat.com
Thu Sep 25 05:04:35 EDT 2014


On 09/24/2014 08:40 PM, J. Mikulec wrote:
> Hello,
> 
> if I create VM from template through web manager, it shows in General - 
> Template "Clone/Independent". When created through REST API, it shows 
> "Thin/Dependent". When it is Thin/Dependent, it is not possible to 
> remove used template but VM creation is much faster. I would like to 
> have more info about this but cannot find any. So I cannot find how to 
> create Independent with REST API.
> 
> Thanks, Jiri

You have to use the "disks.clone" parameter, for example:

#!/bin/sh -ex

url="https://ovirt.example.com/ovirt-engine/api"
user="admin at internal"
password="******"

curl \
--verbose \
--insecure \
--request POST \
--user "${user}:${password}" \
--header "Content-Type: application/xml" \
--header "Accept: application/xml" \
--data "
<vm>
  <name>myvm</name>
  <cluster>
    <name>mycluster</name>
  </cluster>
  <template>
    <name>mytemplate</name>
  </template>
  <disks>
    <clone>true</clone>
  </disks>
</vm>
" \
"${url}/vms"

-- 
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