Attach volumes to virtual machine
POST/core/virtual-machines/:vm_id/attach-volumes
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
ACTIVEorSHUTOFFstate. Volumes referenced in the request body must themselves be in theavailablestate.
Request
Responses
- 200
- 400
- 401
- 404
- 405
- 500
Volumes have been successfully attached to the virtual machine.
Bad Request
Common cause: error_reason: bad_request.
Unauthorized
Not Found
Method Not Allowed
Internal Server Error
Was this page helpful?