Snapshots
Updated
A snapshot captures a running machine so you can put it back exactly as it was. Snapshots are available for classic VMs.
What a snapshot is
Section titled “What a snapshot is”One snapshot is always both the disk and the memory, taken together in a single moment. The machine pauses briefly while the memory is written out, then resumes on its own.
The two halves are never separated, and that is a correctness requirement rather than a convenience. Restoring memory alone would put the guest’s view of its filesystem back in time while the disk stayed in the future, and the next writes would corrupt it silently.
Taking one
Section titled “Taking one”Open a running machine, go to its snapshots, and give the snapshot a name of up to 64 characters. Expect a short pause, roughly the time it takes to write the guest’s memory to disk.
Plan for the space: each snapshot stores about as much as the guest’s memory size, plus disk growth as the machine keeps writing afterwards.
Restoring one
Section titled “Restoring one”When Virtainer Lite refuses
Section titled “When Virtainer Lite refuses”Snapshots fail loudly and early rather than producing something that cannot be restored safely.
| Refused when | Why |
|---|---|
| The machine is not running | The point of the snapshot is the running memory state |
| A data volume is attached | The volume would not roll back with the memory, leaving it stranded in the future. Detach it first |
| A PCI device is passed through | The device’s state lives outside the machine and cannot be captured |
| It is an AppVM | AppVMs roll back by redeploying instead. See Logs, exec, and redeploy |
| The machine’s shape changed | Restore requires the same vCPU and memory shape as when the snapshot was taken |
Limits
Section titled “Limits”Each machine keeps up to eight snapshots. At the limit you must delete one yourself. Virtainer Lite will not silently evict your oldest restore point to make room for a new one.