On this page

9.5 Instant recovery

With instant recovery, an image or Hyper-V backup runs as a virtual machine before it is restored. The agent on the hypervisor serves the disks straight from the repository: reads go through a cache, writes go into a local overlay, and the repository is never changed. A failed machine is thus reachable as a VM within minutes while the actual restore is still pending.

The web interface has no page for this. Sessions are driven through the REST API (POST /instant). Every session appears as a run of kind "instant" under Runs, with log and progress, and does not count against the limits for concurrent jobs per agent or repository.

Modes

Mode

Requirement

Result

proxmox

agent on a Proxmox VE node

The agent creates a VM and starts it on the NBD disks. "Migrate" moves the disks to a PVE storage while the VM runs (drive-mirror).

export (default)

any agent

Only the disks are served (NBD, or iSCSI with iscsi), for example for your own QEMU/libvirt.

hyperv

Windows agent on a Hyper-V host (feature instant.hyperv)

The disks are attached over iSCSI (loopback, CHAP) and the agent creates a VM with pass-through disks. "Migrate" copies them into new VHDX files (short downtime).

The source is a snapshot of an image or hyperv workload. Proxmox vzdump backups cannot be started instantly because the archive has no random access; restore them instead. Read speed is that of the repository through the server: practical from local disks or a NAS, slow from S3.

Procedure

  1. Find the snapshot ID of the image or Hyper-V backup (Restore or Runs, copy the snapshot ID).

  2. Start the session: POST /instant with snapshot_id, agent_id (agent on the hypervisor; default: the agent that made the backup) and mode. The answer contains id and run_id; the session ID is the run ID.

  3. Query the state: GET /instant/<id> (with live=true the server asks the agent directly). Phases: starting, serving (NBD ready), running (VM started), migrating, migrated, stopping, stopped, failed.

  4. When the VM works as expected, move the disks to real storage with POST /instant/<id>/migrate ("migrate back"). The NBD server then stops and the overlays are deleted.

  5. Or discard the session with POST /instant/<id>/stop: the temporary VM and all writes are deleted.

Roles: starting and stopping need the right to restore (restore); reading needs readonly. migrate in mode export needs the Administrator role. Users restricted to their own machines may start instant recovery only from and to those machines.

Example: Proxmox

S=https://backup-server:8443/api/v1
H="Authorization: Bearer pdc_..."
# Boot the latest image of a machine as VM 9100 on a PVE node
curl -H "$H" -X POST $S/instant -d '{"snapshot_id":"<id>","agent_id":"<pve agent>","mode":"proxmox",
  "proxmox":{"vmid":9100,"memory_mb":4096,"cores":2,"net0":"virtio,bridge=vmbr0","ostype":"win11"}}'
curl -H "$H" $S/instant/<id>                                           # phase, NBD exports, overlay usage
curl -H "$H" -X POST $S/instant/<id>/migrate -d '{"storage":"local-lvm"}'   # live move to real storage
curl -H "$H" -X POST $S/instant/<id>/stop                              # or: discard the VM and its writes

Live updates come from GET /events?run_id=<session ID> (server-sent events). After migrating, PVE keeps the new disk configuration as a pending change until the VM has been stopped and started once.

Endpoints

Endpoint

Role

Purpose

POST /instant

restore

Start a session; answer 201 with id and run_id.

GET /instant

readonly

List sessions (active: only sessions that did not end; limit 1 to 200, default 50), newest first.

GET /instant/{id}

readonly

Query a session; live=true asks the agent now (409 if offline).

POST /instant/{id}/migrate

restore (proxmox), admin (export)

Move the disks to real storage; 202, 409 if not running, already migrating or ended.

POST /instant/{id}/stop

restore

End and discard the session; 409 if it already ended.

Fields of POST /instant

Field

Meaning

Default

snapshot_id

Required. Full ID or unique prefix (at least 8 hex characters). Workload image or hyperv.

–

agent_id

Agent on the hypervisor host; for proxmox an agent on a PVE node.

agent of the backup

disks

Disk directories in the snapshot (/image/disk0, /hyperv/<vm id>/image/disk0). At most 16 (6 with SATA).

all

mode

export, proxmox or hyperv.

export

overlay_dir

Absolute folder for the overlays. Overlays are sparse files of the disk size; guest writes use space there.

<agent state>/instant

cache_mib

Read cache per disk, 8 to 8192 MiB.

256

listen

Mode export only: a loopback TCP address (127.0.0.1:10809) instead of the Unix socket. NBD has no authentication, so only loopback is accepted. Windows agents always use loopback TCP.

Unix socket <overlay_dir>/<session>/nbd.sock (mode 0600)

proxmox

Mode proxmox: vmid (required, free in the cluster), name (default pdc-instant-<vmid>), memory_mb (2048), cores (2), bios (auto: OVMF if the first disk has a GPT with an EFI system partition, else SeaBIOS; seabios, ovmf), bus (sata, boots Windows without drivers; virtio), net0 (e.g. virtio,bridge=vmbr0; default no network), ostype, machine, bin_dir, qmp_dir (default /var/run/qemu-server).

–

iscsi

Serve the disks over the agent's iSCSI target instead of NBD. Needs the agent feature instant.iscsi; not combinable with listen or mode proxmox. One target per disk with LUN 0, URL iscsi://<portal>/<iqn>/0. listen (default 127.0.0.1:0; other addresses only with allow_remote: true, which needs Administrator and CHAP), auth: chap (default; one-way CHAP with a random 16-character secret per session, in mode export in the file status.chap_secret_file on the agent host) or none (no authentication; target names then carry a random suffix).

–

hyperv

Mode hyperv: name (default PDC instant <snapshot>), memory_mb (2048), cores (2), generation (1 or 2; default 2 for a GPT with an EFI system partition, else 1), switch (virtual switch; default not connected), secure_boot (generation 2). The disks run over iSCSI on loopback with CHAP.

–

Migrate bodies

Mode

Body

proxmox

{"storage":"local-lvm","format":"raw"}: storage is required, format optional (raw or qcow2). Per disk the agent allocates a volume and mirrors with drive-mirror; the VM keeps running meanwhile.

export (administrator)

{"qmp_socket":"/path/qemu.qmp","targets":[{"device":"<drive>","target":"/path/disk.qcow2","format":"qcow2"}]}: targets must exist and be at least as large as the disks.

hyperv

{"vhdx_dir":"D:\\VMs"} optional; giving a folder needs Administrator. The agent copies each disk into a new dynamic VHDX while the VM runs, shuts the guest down (turned off after 10 minutes), copies the last changes and starts the VM again. Downtime: guest shutdown, last delta, guest boot.

On stop in mode proxmox the agent destroys the temporary VM (qm stop, qm destroy), closes the NBD server and deletes the overlays; the run ends as "cancelled". In mode hyperv it turns the VM off, removes it and disconnects the iSCSI targets.

Last updated Nov 16, 2026