v12

latestOpenAPI 3.0.3raw.githubusercontent.com2026-06-1811583196.1 KB
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

namestring required

Custom image name.

descriptionstring

Optional description for the saved image.

disk_idinteger

Which disk to capture. 0 for the OS disk, 1+ for attached volumes.

snapshot_idinteger

Source for the image. -1 captures the current live disk state. Pass a snapshot ID to capture from a saved snapshot.

Example request

{
  "name": "web-server-baseline"
}

Response

Image creation initiated

successboolean