Skip to content

feat: VM snapshots - #426

Open
v0l wants to merge 2 commits into
masterfrom
feat/vm-snapshots
Open

v0l wants to merge 2 commits into
masterfrom
feat/vm-snapshots

Conversation

@v0l

@v0l v0l commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Snapshot support on Proxmox, libvirt, marketplace nodes and the dummy host.

  • VmHostClient: list_snapshots, create_snapshot, rollback_snapshot, delete_snapshot
  • Proxmox keeps a running VM running; libvirt shuts it down for the copy and restarts it (UEFI guests cannot be snapshotted live)
  • Only the newest snapshot can be restored (Proxmox ZFS refuses anything else), 409 names the newer ones to delete
  • Restore reapplies the current config and starts the VM; CheckVm is queued even when it fails
  • Create, restore and delete run as a VmSnapshot worker job, serialised with spawn, reinstall and upgrades
  • Up to 3 snapshots per VM, names 2 to 40 chars (pve-configid), validated on path params too
  • Reinstall and disk resize delete snapshots first
  • API: GET/POST /api/v1/vm/{id}/snapshots, DELETE /api/v1/vm/{id}/snapshots/{name}, PATCH /api/v1/vm/{id}/snapshots/{name}/restore
  • VM history: snapshot_created, snapshot_restored, snapshot_deleted

Tested: workspace unit tests, wiremock tests for Proxmox, real libvirt/QEMU (snapshots_survive_a_full_cycle_on_real_qemu). Not tested against a real Proxmox node.

@v0l v0l added enhancement New feature or request api User-facing or admin API changes labels Oct 21, 2026
@v0l
v0l force-pushed the feat/vm-snapshots branch from 96c1b6b to 42814bb Compare October 21, 2026 11:06
@v0l
v0l force-pushed the feat/vm-snapshots branch from af1f976 to 16c25cf Compare October 21, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api User-facing or admin API changes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant