<div dir="ltr">Hi all,<div><br></div><div>I&#39;m exploring using ovirt&#39;s REST APIs to manage VM creation/deletion/etc. I can create the VM, attach an ISO and change boot order, but I&#39;m unable to attach a storage disk to the VM. I send a POST request to /api/vms/&lt;vm uuid&gt;/disks with the structure:</div>
<div>{&quot;storage_domain&quot;:</div><div>    {&quot;name&quot;:&quot;am_data&quot;,</div><div>     &quot;id&quot;:&quot;6fbee79d-5b71-48c1-b86c-ee9755a46013&quot;</div><div>    },</div><div>    &quot;size&quot;:&quot;4294967296&quot;,</div>
<div>    &quot;type&quot;:&quot;system&quot;, </div><div>    &quot;interface&quot;:&quot;ide&quot;, </div><div>    &quot;format&quot;:&quot;raw&quot;, </div><div>    &quot;sparse&quot;:&quot;false&quot;, </div><div>    &quot;bootable&quot;:&quot;true&quot;, </div>
<div>    &quot;wipe_after_delete&quot;:&quot;false&quot;</div><div>}<br></div><div>The response I receive is</div><div><div>{</div><div>  &quot;reason&quot; : &quot;Operation Failed&quot;,</div><div>  &quot;detail&quot; : &quot;[Cannot add Virtual Machine Disk. Storage Domain doesn&#39;t exist.]&quot;</div>
<div>}</div></div><div>For the storage domain, I&#39;ve tried just the name, just the id, and both with the same results. When I attach storage from the GUI, the disk is created/attached fine, and a GET request for the disks of the VM shows the storage domain as the same as I was attempting to use before.</div>
<div><div>&quot;storage_domains&quot; : {</div><div>      &quot;storage_domain&quot; : [ {</div><div>        &quot;id&quot; : &quot;6fbee79d-5b71-48c1-b86c-ee9755a46013&quot;</div><div>      } ]</div><div>    },</div></div>
<div><br></div><div>Any idea what I might be doing wrong?</div><div><br></div><div>Thanks,</div><div>Andrew</div></div>