Save and restore a machine
Take a snapshot before you change a machine, and revert to it if the change goes wrong.
Take and revert snapshots
- Select the machine and choose Machine > Take Snapshot.
- Enter a name. To save the running state too, select Include Memory.
- Click Take Snapshot.
To revert, choose View > Snapshots, select the snapshot, and click Revert. In Terminal:
osmates snapshot create dev --name clean --memory
osmates snapshot revert dev clean
Reverting discards everything since the snapshot. A running machine is turned off without a shutdown, which loses unfinished writes to shared folders. The current state is saved first, unless you turn off Before Reverting in Snapshots settings.
Keep, rename, and delete snapshots
Choose View > Snapshots, then select a snapshot.


- To keep a snapshot from automatic deletion, select Keep.
- To rename it, press Return.
- To delete it, press Delete and confirm.
The listed size includes blocks shared with the machine's disk, so deleting frees less. The confirmation and osmates snapshot list dev show what it frees.
Schedule automatic snapshots
- Choose Machine > Machine Settings, then click Snapshots.
- Set While Running to Every Hour or Every Day.
- Choose whether to Include Memory, and how many to Keep.
OSMates also takes snapshots by itself, and deletes the oldest of each kind:
| Snapshot | Kept |
|---|---|
| Scheduled, or asked for by an agent | The newest, up to the Keep number, 5 by default |
| Before a revert, an update, or Windows drivers | The newest of each kind, up to the Keep number |
| At the start of an agent session | The newest 3 |
| Taken or kept by you | All of them |
While your Mac is hot or low on memory, a scheduled snapshot waits up to 30 minutes.
Recover after an OSMates update
Before a machine first starts on a new OSMates version, it saves a Before OSMates <version> snapshot, or doesn't start. If the update breaks the machine, revert to that snapshot.
Go back to an earlier version
- Read the Changed section of your version's release notes. It says whether older versions open the machines it started.
- Choose OSMates > Settings, then click Updates. Turn off Download and install updates automatically.
- Download the earlier version from its release notes. During the beta, see Join the beta.
- Replace OSMates in Applications and open it. If machines are running, see Update OSMates.
- Revert each machine to
Before OSMates <newer version>, then start it. - When the newer version is offered, click Skip This Version.
Replace the app before you revert, or the reverted machine starts on the newer version again.
Let programs in a machine save and restore it
- Choose Machine > Machine Settings, then click Agents.
- Turn on Programs in This Machine May Ask for Snapshots, Reverts and Restarts.
- In the machine, run
osmates-agent hostas root or an administrator, from an administrator command prompt on Windows.
Inside a Linux machine:
sudo osmates-agent host snapshot --name before-tests
sudo osmates-agent host revert before-tests
sudo osmates-agent host restart
The command exits with 0 when done, 1 when refused, and 3 if the machine was reverted while it waited. revert sees only snapshots taken from inside the machine. Find the requests in Activity, with From set to Everyone.
Limits
- A snapshot needs 6 GiB of free space on the machine's volume. Temporary machines can't take one.
- A running machine pauses for a moment, and about half a second more per GiB of memory saved.
- A Windows snapshot with memory needs free space for the machine's memory plus 1 GiB.
- Memory isn't saved while a USB device is attached, or in Linux with 3D acceleration on.
- A Linux machine with a display saves memory only with its USB controller driver. See Linux guest isn't using its USB controller.
- Windows can stall during the pause. See Windows stalls around snapshots.