<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">&lt;<a href="mailto:vanoppen.koen@gmail.com" target="_blank">vanoppen.koen@gmail.com</a>&gt;</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">&lt;<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>&gt;</span><br>Date: 2014-12-01 12:16 GMT+01:00<br>Subject: Re: [ovirt-users] Storage API command<br>To: Koen Vanoppen &lt;<a href="mailto:vanoppen.koen@gmail.com" target="_blank">vanoppen.koen@gmail.com</a>&gt;, &quot;<a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a>&quot; &lt;<a href="mailto:users@ovirt.org" target="_blank">users@ovirt.org</a>&gt;<br><br><br><div><div>On 12/01/2014 12:05 PM, Koen Vanoppen wrote:<br>
&gt; Dear All,<br>
&gt;<br>
&gt; Quick question. How can we say to the API which storage pool to use when<br>
&gt; assigning a disk to a VM?<br>
&gt;<br>
&gt; Kind regards,<br>
&gt;<br>
&gt; Koen<br>
&gt;<br>
<br>
</div></div>Like this:<br>
<br>
#!/bin/sh -ex<br>
<br>
url=&quot;<a href="https://ovirt.example.com/ovirt-engine/api" target="_blank">https://ovirt.example.com/ovirt-engine/api</a>&quot;<br>
user=&quot;admin@internal&quot;<br>
password=&quot;******&quot;<br>
vmid=&quot;...&quot;<br>
<br>
curl \<br>
--insecure \<br>
--request POST \<br>
--user &quot;${user}:${password}&quot; \<br>
--header &quot;Content-Type: application/xml&quot; \<br>
--header &quot;Accept: application/xml&quot; \<br>
--data &#39;<br>
&lt;disk&gt;<br>
  &lt;alias&gt;mydisk&lt;/alias&gt;<br>
  &lt;size&gt;100000&lt;/size&gt;<br>
  &lt;interface&gt;virtio&lt;/interface&gt;<br>
  &lt;format&gt;raw&lt;/format&gt;<br>
  &lt;active&gt;true&lt;/active&gt;<br>
  &lt;storage_domains&gt;<br>
    &lt;storage_domain&gt;<br>
      &lt;name&gt;mystoragedomain&lt;/name&gt;<br>
    &lt;/storage_domain&gt;<br>
  &lt;/storage_domains&gt;<br>
&lt;/disk&gt;<br>
&#39; \<br>
&quot;${url}/vms/${vmid}/disks&quot;<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>