Synopsis
Description
Thesnapshot command manages Firecracker VM snapshots. You can save the full state of a running VM, restore it later, list existing snapshots, and delete ones you no longer need.
Snapshots require the Firecracker backend. They are not available on QEMU.
Subcommands
create
Save the full state of a running or paused VM.The identifier of the VM to snapshot. The VM must be running or paused.
A custom identifier for the snapshot. If omitted, SmolVM generates one automatically (for example,
snap-my-vm-1717012345). Must contain only lowercase letters, numbers, and hyphens.Resume the source VM after the snapshot is created. Without this flag, the VM stays paused.
Output machine-readable JSON instead of human-friendly text.
restore
Restore a snapshot back into its original VM identity.The identifier of the snapshot to restore.
Resume the restored VM immediately. Without this flag, the VM is restored in a paused state.
Allow restoring a snapshot that was already restored before. By default, a snapshot can only be restored once.
Output machine-readable JSON instead of human-friendly text.
delete
Delete a snapshot and its associated files.The identifier of the snapshot to delete.
Output machine-readable JSON instead of human-friendly text.
list
List all snapshots, optionally filtered by source VM.Filter the list to show only snapshots created from this VM.
Output machine-readable JSON instead of human-friendly text.
JSON output
All subcommands support--json for scripting and automation. The JSON response includes snapshot metadata such as snapshot_id, vm_id, restored, created_at, and file paths.
Example:
Exit codes
| Code | Description |
|---|---|
0 | Success |
1 | Error (snapshot not found, VM not running, etc.) |
2 | Usage error (missing subcommand or arguments) |
Related commands
smolvm list— See all running VMssmolvm create— Create a new VM to snapshotsmolvm ssh— Connect to a restored VM