Cloud Panel

Grow the disk

POST/api/v1/vms/{vm_uuid}/disk/resize

Grows the root disk while the server runs. A disk cannot shrink. Systems from our images grow their filesystem by themselves; with disk auto-extend on, the server does this on its own before the disk fills up.

Parameters

NameInDescription
vm_uuidpath, stringrequiredServer id, from Create a VM or List VMs

Request body

FieldTypeDescription
new_size_gbintegerrequiredNew root disk size, GB; bigger than now

Example request

curl -X POST "https://platform.serverscamp.com/api/v1/vms/$VM_UUID/disk/resize" \
  -H "Authorization: Bearer $API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "new_size_gb": 100
  }'

Answer

Status 200 with this body.

FieldTypeDescription
vm_uuidstringrequired
statusstringrequiredqueued: the change runs in the background while the server runs
disk_gbintegerrequiredRoot disk size after the change, GB
storage_class_idintegerrequiredDisk id after the change
{
  "vm_uuid": "6f1c2a9e-4b3d-4e8a-9c71-2d5e8f0a1b34",
  "status": "queued",
  "disk_gb": 100,
  "storage_class_id": 18
}

Errors

StatusWhen
400Not bigger than now, or above the disk's largest size
401No token, or a token that is not valid
409The server is busy with another operation
422The body or a parameter is not what the operation takes

Every operation can also answer 401 without a valid token. All errors