<div dir="ltr">Thanks!!!! Just what I needed!!<br></div><div class="gmail_extra"><br><div class="gmail_quote">2014-12-01 12:29 GMT+01:00 Koen Vanoppen <span dir="ltr"><<a href="mailto:vanoppen.koen@gmail.com" target="_blank">vanoppen.koen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><div dir="ltr"><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Juan Hernández</b> <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span><br>Date: 2014-12-01 12:16 GMT+01:00<br>Subject: Re: [ovirt-users] Storage API command<br>To: Koen Vanoppen <<a href="mailto:vanoppen.koen@gmail.com" target="_blank">vanoppen.koen@gmail.com</a>>, "<a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a>" <<a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a>><br><br><br><div><div>On 12/01/2014 12:05 PM, Koen Vanoppen wrote:<br>
> Dear All,<br>
><br>
> Quick question. How can we say to the API which storage pool to use when<br>
> assigning a disk to a VM?<br>
><br>
> Kind regards,<br>
><br>
> Koen<br>
><br>
<br>
</div></div>Like this:<br>
<br>
#!/bin/sh -ex<br>
<br>
url="<a href="https://ovirt.example.com/ovirt-engine/api" target="_blank">https://ovirt.example.com/ovirt-engine/api</a>"<br>
user="admin@internal"<br>
password="******"<br>
vmid="..."<br>
<br>
curl \<br>
--insecure \<br>
--request POST \<br>
--user "${user}:${password}" \<br>
--header "Content-Type: application/xml" \<br>
--header "Accept: application/xml" \<br>
--data '<br>
<disk><br>
<alias>mydisk</alias><br>
<size>100000</size><br>
<interface>virtio</interface><br>
<format>raw</format><br>
<active>true</active><br>
<storage_domains><br>
<storage_domain><br>
<name>mystoragedomain</name><br>
</storage_domain><br>
</storage_domains><br>
</disk><br>
' \<br>
"${url}/vms/${vmid}/disks"<br>
<span><font color="#888888"><br>
--<br>
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.<br>
</font></span></div><br></div>
</div></div></blockquote></div><br></div>