Virtual Machines
Save VM disk as custom image
Save a VM's disk (live state or a snapshot) as a reusable custom OS image. The new image becomes available alongside the public OS templates and can be passed as template_id when creating a new VM.
Sources
Pick what to capture with disk_id and snapshot_id:
- disk_id: 0 — the OS disk
- disk_id: 1+ — an attached volume
- snapshot_id: -1 — capture the current live disk state (stop the VM first for a consistent image)
- snapshot_id: <id> — capture from a specific saved snapshot
post/api/v1/vms/{id}/save-image
Path parameters
idstring uuid required
VM ID (UUID)
Headers
X-Project-IDstring uuid required
Project ID. Required for all mutating operations (create, delete, power actions, resize).
Request body
Example request
{
"name": "web-server-baseline"
}Response
Image creation initiated