Attach and detach (custom) storage disks from VM's, API only

Attach and detach (custom) storage disks from VM's, API only

If needed here are the instructions for creating a standalone block storage disk from URL from custom image

Attach already existing disk to VM

curl https://<api-hostname>/v1/user-resource/vm/storage/attach \ -H 'apikey: [apikey]' \ -X POST \ -d "uuid=[VM_uuid]" \ -d "storage_uuid=[storage_uuid]" \ -d "billing_account_id=[billing_account_id]"



Detach disk from VM

curl https://<api-hostname>/v1/user-resource/vm/storage/detach \ -H 'apikey: [apikey]' \ -X POST \ -d "uuid=[VM_uuid]" \ -d "storage_uuid=[storage_uuid]"

Detached disk will not be deleted and can be assigned to another VM

Boot disk can be detached from VM when VM is stopped from UI