Volumes
Attach volume to VM
Attach a volume to a VM. The VM must be in the same region as the volume. A volume can only be attached to one VM at a time — detach it first if it's already attached elsewhere.
Inside the guest, the volume appears as /dev/vdb, /dev/vdc, etc. (virtio-blk).
post/api/v1/volumes/{id}/attach
Path parameters
idinteger required
Volume ID
Headers
X-Project-IDstring uuid required
Project ID. Required for all mutating operations (create, delete, power actions, resize).
Request body
Response
Volume attached
Example response
{
"data": {
"name": "data-vol-1",
"volume_type": "nvme",
"size": 100
}
}