Skip to content
86% off$349 $48.86code BF2026

Guides

Roll Back a Mac to a Previous State: Snapshot a macOS VM First

Test a deploy or MDM script in a macOS VM, then roll back. Take an APFS-clone snapshot, run the script, restore. Options: spare Mac, clones, UTM, Hermitbox.

GuideUpdated 8 min read

On this page

You want to test a deploy or MDM script before it touches production, and you want to get back to the exact state you started from, "like a VM snapshot." On a physical Mac there is no such button, and some VM apps lack one too. People on admin forums report that UTM VMs "don't have snapshotting" and suggest cloning the VM and working on the clone instead.

We make Hermitbox, so weigh our view accordingly; we've tried to be fair to the other options.

Why rolling back a Mac is hard

A physical Mac has no built-in "restore to point X" for a whole system. Time Machine restores files, not a tested-and-discarded configuration. The realistic choices are to wipe the Mac, or to run the test somewhere that can be reset cheaply.

A VM is that place. On APFS, a VM's disk can be cloned copy-on-write: the clone shares every block with the original until something changes. That is why a snapshot can be instant and cost almost no space at first. Whether your VM app exposes this as a snapshot, a clone, or neither is what differs between tools.

Pick a rollback method

MethodHow you roll backExtra spaceGood for
Spare Mac, Erase All Content and SettingsErase the Mac and set it up againNoneTesting on real hardware
Clone the VMDelete the clone, clone the original againLittle on APFSOne-off tests in any VM app with a clone command
UTMClone; snapshots on its Apple backend need macOS 27 (as of November 2026)Not covered in our notesA free option
Hermitbox snapshotsRestore… a snapshot from a timelineLittle on APFSRepeated runs with many rollback points
Hermitbox Run Without Saving ChangesClose the window and discardTemporary copy, deleted on stopOne throwaway run

We have no verified notes on Tart or VMware Fusion for this job, so we don't describe their snapshot features. People on admin forums mention Tart with Packer; check each project's official documentation before choosing.

Option 1: Erase a spare Mac

If the test depends on real hardware, Erase All Content and Settings returns a Mac to a clean state. Search for "Erase" in System Settings to find it; it exists on Apple silicon Macs and Macs with a T2 chip. It is a full reset rather than a rollback to a point you chose, and it ties up a whole machine for the time it takes to erase and set up again.

Option 2: Clone the VM and work on the copy

This works in any VM app that can clone. In Hermitbox a clone is an instant APFS copy that shares unchanged blocks with the original.

  1. Shut the VM down (or suspend it). Hermitbox can't clone a running VM.
  2. Select it and press ⌘D (Machine ▸ Clone). You get "NAME copy" with a new id and MAC address.
  3. Run your script in the copy.
  4. To roll back, choose Move to Trash… (⌘⌫) on the copy, then clone the original again.

Keep the original untouched as your baseline. The downside is bookkeeping: you can only return to the one state you cloned from, and you manage the copies yourself. Snapshots keep a timeline for you.

Option 3: Hermitbox snapshots

Snapshots work on macOS 14 or later hosts. Each one is an APFS clone, so taking it is instant and takes no space until the VM changes.

Before you start

  • Apple silicon. macOS VMs are not available on Intel Macs.
  • An APFS library disk. On other disks a snapshot is a full copy, and Hermitbox asks first ("A Snapshot Makes a Full Copy"). The welcome sheet and Settings ▸ General ▸ Library folder tell you whether the disk is APFS.
  • Free space. Snapshots are cheap, but the VM's disk still grows as it fills.

Set up the test VM and take a baseline

  1. Create a macOS VM and finish macOS Setup Assistant. To test against an older release, choose Choose a Version… in the New VM assistant. Steps are in Create a macOS virtual machine.
  2. Install whatever your script expects to find, such as tools or a user account.
  3. Shut the VM down for a clean baseline. Hermitbox can also snapshot a running VM: it briefly suspends it, clones it and resumes it, and marks the snapshot "Includes running state".
  4. Select the VM and press ⇧⌘S, or take one from the Snapshots tab in the inspector.
  5. Optionally rename it: ⋯ menu ▸ Rename…, for example "clean baseline".

Get your script into the VM

Use a shared folder so the script stays on your Mac. In the inspector's Shared Folders section, choose Add Folder… and tick Read only if the VM shouldn't change the files. In macOS guests the folder appears in My Shared Files (/Volumes/My Shared Files). Details are in Share folders and the clipboard.

Run the test, then restore

  1. Start the VM and run your script.
  2. Check the result.
  3. Open the VM's Snapshots tab, click the ⋯ menu on your baseline and choose Restore….
  4. Leave Snapshot the current state first ticked (it is on by default) and confirm. The post-test state is kept as its own snapshot, so you can go back and inspect what the script did.

The same ⋯ menu has New VM from Snapshot (a separate VM with a fresh identity), Rename… and Delete…. Delete can't be undone; the confirmation tells you roughly how much space it frees.

Snapshot automatically before every run

If you start the same VM many times, turn on Before each start in the Snapshots tab and set Keep N (1 to 20, default 3). Hermitbox then snapshots the VM at each start and keeps the last N, marked "Taken automatically before a start". It is off by default and needs an APFS disk.

Throwaway runs

Run Without Saving Changes (⌥⌘R, or Option-click ▶ on a box) starts a disposable copy. When you close it, Hermitbox asks "Stop and Discard Changes?" and throws away everything that changed. Snapshots and Suspend are not available in a disposable run, and it counts toward the two-macOS-VM limit.

Script the loop with the CLI

Install the hermitbox tool from Settings ▸ Advanced ▸ Command line tool, then:

bash
hermitbox snapshot create "macOS Test"
hermitbox snapshot list "macOS Test"
hermitbox snapshot restore "macOS Test" SNAPSHOT
  • create takes a snapshot of the VM.
  • list shows its snapshots.
  • restore rolls back to the snapshot you name. It always snapshots the current state first, so a restore can be undone.

The VM name is case-insensitive and a unique prefix is enough. Run hermitbox help for the exact syntax. The CLI can't create VMs or change VM settings, so build the VM in the app first. There is also a Take Snapshot action for Shortcuts. See Automate Hermitbox.

Why a snapshot or restore fails

Message or symptomCauseFix
"A Snapshot Makes a Full Copy"Library disk is not APFSMove the library to an APFS disk, or accept full copies
"No Automatic Snapshot"Disk not APFS, or low spaceSame fix; check free space
"Disk Full"Snapshots keep old blocks as the VM changesDelete old snapshots; check the Storage view
"Busy"A snapshot, clone or export is runningWait for it to finish
"Couldn't Resume Saved State"Saved state no longer matches the VMMachine ▸ Discard Saved State…
"Two macOS VMs Are Already Running"Apple's two-VM limitShut one down; Linux VMs don't count

To move the library, use Settings ▸ General ▸ Library folder for new VMs or Move To… for an existing one. In the Storage view, clones and snapshots show "Up to" sizes because they share unchanged blocks. For the two-VM limit, see why you can only run two macOS VMs.

Checklist before you run the script

  • The Mac has Apple silicon and the VM's library disk is APFS.
  • The VM is set up with everything the script expects, and a named baseline snapshot exists.
  • The script lives in a shared folder, read-only if it shouldn't change.
  • Snapshot the current state first is still ticked when you restore.
  • Fewer than two other macOS VMs are running.

Limits to know

  • Hermitbox does not run Windows or Intel (x86-64) guests. If your script targets those, use a different tool.
  • Snapshots are not available during a disposable run.
  • Exporting a VM (.hermitboxarchive) does not include its snapshots or saved state.
  • We haven't documented MDM enrollment inside a Hermitbox VM. If your script depends on enrollment, test that path before relying on a VM.

If nothing works

Email MacSuite support through the support page. Include the exact message text, the macOS version of the VM and of your Mac, whether the library disk is APFS, and what you already tried.

text
Subject: Hermitbox snapshot/restore problem

Hermitbox version: 1.0.0
Mac: Apple silicon, macOS (your version)
VM: macOS (guest version)
Library disk is APFS: yes/no
What I did: took a snapshot, ran a script, chose Restore…
Exact message: (paste the alert title and text)
Already tried: waiting, checking free space, restarting Hermitbox

Common questions

Does UTM have snapshots?

People on admin forums report that UTM VMs lack snapshots, and our notes say that on its Apple Virtualization backend, snapshots, clones and disposable runs need macOS 27 (as of November 2026). We have not checked UTM's other backends.

Can I snapshot a running VM?

Yes. Hermitbox briefly suspends the VM, clones it and resumes it, and marks the snapshot "Includes running state". For a clean baseline, shut the VM down first.

Will a restore lose the state I just tested?

Not by default. Snapshot the current state first is on, so the post-test state is saved as its own snapshot.

How much space do snapshots use?

Almost none at first on APFS; they grow as the VM's disk changes. On non-APFS disks each snapshot is a full copy.

Hermitbox is part of MacSuite; you can try it free for 7 days, then it is a $349 one-time purchase as of November 2026 (see pricing). Next, read Getting started with Hermitbox and Snapshots, clones, templates and throwaway runs.

Every app.
One purchase.