Mount Vm Volume
POST /v1/vms/{vm_id}/volumes
Mount one of your volumes into a running VM at mount_path. rw mounts the live
volume and allows one writing VM at a time; ro mounts a checkpoint
(checkpoint_id, the latest by default). The mount is recorded on the VM's
session. With wait=false the call returns status: pending before the mount
finishes.
Authentication
Requires authentication via: OAuth2PasswordBearer.
Parameters
| Name | In | Type | Required | Description | Constraints |
|---|---|---|---|---|---|
vm_id | path | string | Yes | ||
wait | query | boolean | No | Wait for mount operation to finish | default=true |
X-API-Key | header | string | null | No | nullable |
Request Body
Required: Yes
application/json
Resolved schema:
{
"properties": {
"volume_id": {
"type": "string",
"title": "Volume Id"
},
"mount_path": {
"type": "string",
"title": "Mount Path"
},
"mode": {
"type": "string",
"title": "Mode",
"default": "rw"
},
"checkpoint_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Checkpoint Id"
}
},
"type": "object",
"required": [
"volume_id",
"mount_path"
],
"title": "VMVolumeMountRequest"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
volume_id | string | Yes | ||
mount_path | string | Yes | ||
mode | string | No | default="rw" | |
checkpoint_id | string | null | No | nullable |
Responses
200
Successful Response
application/json
Resolved schema:
{
"properties": {
"volume_id": {
"type": "string",
"title": "Volume Id"
},
"mount_path": {
"type": "string",
"title": "Mount Path"
},
"mode": {
"type": "string",
"title": "Mode"
},
"checkpoint_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Checkpoint Id"
},
"status": {
"type": "string",
"title": "Status"
}
},
"type": "object",
"required": [
"volume_id",
"mount_path",
"mode",
"status"
],
"title": "VMMountedVolumeResponse"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
volume_id | string | Yes | ||
mount_path | string | Yes | ||
mode | string | Yes | ||
checkpoint_id | string | null | No | nullable | |
status | string | Yes |
400
Invalid mount path, mode or checkpoint, or a checkpoint given for a rw mount.
No response body.
401
No credentials, or the Bearer token / X-API-Key is invalid.
No response body.
403
The account is disabled, or a guest token was used; or the VM or the volume belongs to another account.
No response body.
404
VM, volume or checkpoint not found.
No response body.
409
The VM is not running, the volume already has a writer, or the mount path is busy.
No response body.
422
Validation Error
application/json
Resolved schema:
{
"properties": {
"detail": {
"items": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
}
Field details:
| Field | Type | Required | Description | Constraints |
|---|---|---|---|---|
detail | array<object> | No | ||
detail[] | object | No | ||
detail[].loc | array<string | integer> | No | ||
detail[].loc[] | string | integer | No | ||
detail[].msg | string | No | ||
detail[].type | string | No |
503
Volumes are disabled, the VM is temporarily unreachable, or the mount failed transiently. Retry later.
No response body.