Volume Attachment
Attach volumes to virtual machine
Attaches one or more volumes to an existing virtual machine, expanding its storage capacity. Include the virtual machine ID in the path and the volume IDs in the request body to attach the specified volumes to the designated virtual machine. For additional details on volumes, see Shared storage volumes. Attachment limit: each virtual machine can have a maximum of 10 volumes attached at any given time.
State requirement: This operation requires the VM to be in the ACTIVE or SHUTOFF state. Volumes referenced in the request body must themselves be in the available state.
post/core/virtual-machines/{vm_id}/attach-volumes
Request
- Base URL: https://infrahub-api.nexgencloud.com/v1
- URL: https://infrahub-api.nexgencloud.com/v1/core/virtual-machines/{vm_id}/attach-volumes
- Auth: API key in header api_key
Path parameters
vm_idinteger required
ID of the vm.
Request body
Response
Volumes have been successfully attached to the virtual machine.
Example response
{
"message": "We can process with only available volumes.",
"volume_attachments": [
{
"id": 9876,
"instance_id": 1129,
"volume_id": 1402,
"device": "/dev/disk/by-id/virtio-a66fd1a8-e198-4eb4-a",
"status": "ATTACHING",
"created_at": "2026-05-07T09:21:55Z"
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.