How to detach a SD from datacenter through rest api?

Latest response

I get the approach that how to attach a SD to datacenter through rest api, but did not get how to detach SD from datacenter, any idea?


Another issue that when creating a vm, I set '<os><boot dev="network"/><boot dev="hd"/></os>', that means network is the first boot order and hd is the second one. But after creating, the hd is the first one as following. Is it a bug? how to workaround?


<os type="unassigned">
        <boot dev="hd"/>
        <boot dev="network"/>

And is that possible to get the status of a SD from rest API?

There is a good scripts repo with example scripts on github, I haven't tested all of these, but the ones I have work really well:

There are scripts there to deactivate storage and then delete it