Guide

Snapshots

Save and restore VM state with snapshots

vmsan lets you snapshot a running VM and restore it later, preserving the full machine state including memory, processes, and open files.

Create a snapshot

Snapshot a running VM:

vmsan snapshot create <vm-id>

The VM is automatically paused, snapshotted, and resumed. Snapshot files are stored in ~/.vmsan/snapshots/<snapshot-id>/.

To keep the VM paused after the snapshot:

vmsan snapshot create <vm-id> --no-resume

List snapshots

vmsan snapshot list

Use the alias vmsan snapshot ls for a shorter command. Add --json for structured output.

Restore from a snapshot

Create a new VM from an existing snapshot:

vmsan create --snapshot <snapshot-id>

The restored VM boots instantly from the saved state — all processes, memory, and files are exactly as they were at snapshot time.

The agent token is preserved in snapshot metadata, so vmsan exec and vmsan connect work on restored VMs.

Delete snapshots

Remove one or more snapshots:

# Delete a single snapshot
vmsan snapshot delete <snapshot-id>

# Delete multiple snapshots
vmsan snapshot delete <snapshot-id-1> <snapshot-id-2>

Use the alias vmsan snapshot rm for a shorter command.

Deleting a snapshot is permanent. The snapshot files cannot be recovered.

Use cases

  • Save a configured environment and restore it for repeatable testing
  • Checkpoint a long-running process before a risky operation
  • Share a pre-built VM state across team members
  • Speed up CI/CD by restoring from a warm snapshot instead of booting from scratch
Copyright © 2026