Your XML looks correct. I used it in my 3.5 environment and it worksOn 10/22/2014 09:38 AM, Shanil S wrote:
> Hi,
>
> I am using the ovirt 3.5 and when i create VM from the template through
> Ovirt web portal, it displays Template is "Clone/Independent"but with
> the same template When i create through REST API, it shows
> "Thin/Dependent"...
>
> I Found one email thread (
> https://www.mail-archive.com/users@ovirt.org/msg21271.html ) from the
> community for the same issue but even using their method still it
> display the same "Thin/Dependent".
>
> I am using the following xml :-
>
> <vm>
> <name>$name</name>
> <cluster>
> <name>phase1</name>
> </cluster>
> <cpu>
> <topology cores='$core' sockets='$socket'/>
> </cpu>
> <memory>$memory</memory>
> <template>
> <name>$templatetype</name>
> </template>
> <disks>
> <clone>true</clone>
> </disks>
> </vm>
>
> I have attached the screen shots , please check it.
>
correctly, creating "Clone/Independent" virtual machines.
What kind of storage are you using? NFS?
Can you try the following script and report the results?
#!/bin/sh -ex
url="https://engine.example.com/ovirt-engine/api";
user="admin@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.