How fast does a suspended VM come back, and can one saved state be restored more than once?
Answered 2026-10-04: yes, with conditions. Decided 2026-10-04: A, keep running while locked and save after unlock. Source: X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment. (I16I16 (closed): X02-warm-start: Warm startHow long does it take to restore a macOS guest from saved state with a vsock device and a file-handle network attachment?). Changes S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does. and S11-verification-and-spikesS11-verification-and-spikesthe filter's fuzz properties, including one that replays the filtered output and the exit reset into a headless emulator and checks it is back in its initial state, and a conformance case that prints every dropped seq…. Feeds X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest? (I29I29 (closed): X18-vsock-handoff: Host-guest socket and descriptor hand-offX18-vsock-handoff (added to S11-verification-and-spikes in #14)) and X17-image-buildX17-image-build: Unattended image buildCan a macOS guest installed from an Apple restore image get past Setup Assistant, with wb-guestd running as a root LaunchDaemon, without SSH, scripted clicks, or MDM? (I28I28 (closed): X17-image-build: Unattended image buildX17-image-build (added to S11-verification-and-spikes in #14)).
Figure 1. A saved state is the VM’s memory, and it only makes sense together with the disks as they were at the save. Clones of the whole set can each be restored once. Virtualization does not stop a restore onto disks the guest has since written to (red): it came up without an error, so S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does. now forbids it.
The decision left: an idle VM while the host is locked
Section titled “The decision left: an idle VM while the host is locked”Saving encrypts the state with a key that macOS keeps in the Secure Enclave, and the key can only be made while your session is unlocked. With the screen locked the save fails. S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does. saves a VM after an idle period, which often ends while you are away.
Impact
Section titled “Impact”No SEC* control changes under any option.
Evidence
Section titled “Evidence”- verified The configuration with
VZVirtioSocketDeviceandVZFileHandleNetworkDeviceAttachmentpassesvalidateSaveRestoreSupport, and saves and restores. Source: X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment., “Answer”. - verified Restore from a fresh clone to the guest answering on the network: 3.71 s p50, 3.92 s p95 at 4 GiB, and 4.11 s and 4.58 s at 8 GiB, 20 runs each. Cold boot from a fresh clone: 5.04 s and 5.38 s. Save: 2.94 s and 3.20 s at 4 GiB. Source: X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment., “Measurements”, and
results/stats.txton the spike branch. - verified A restore with a new machine identifier or a new MAC address fails with “invalid argument”. A restore fails while another VM with the same identifier runs: 4 failures in 4 tries. Three of the tries were pairs of concurrent restores of one state, where one restore of each pair failed. The fourth was a restore next to a cold-booted VM with the same identifier. Clones of two states with different identifiers restored side by side. Source: X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment., “Answer”, conditions 2 and 3.
- verified A restore onto disks the guest had run from for 10 s gave no error. Source: X02-warm-startX02-warm-start: Warm startMeasure time to restore a macOS guest from saved state with a vsock device and a file-handle network attachment., condition 1.
- verified Save failed with the screen locked: the log shows the Secure Enclave refusing the key (
errSecInteractionNotAllowed),ioregshowed the console locked, and the login window process logged the key store as locked just before the unlock. After the unlock, the same binary on the same bundle saved 21 times without an error. Source:results/save-locked.log,results/save-locked-run.mdandresults/cycle-4g.jsonlon the spike branch. The “permission denied” text and theioreglock-state excerpt insave-locked-run.mdare transcribed from the session, because the next run overwrote that run’s output file andioregoutput wasn’t saved at the time. - assumed That a working guest restores within the budget too. All states came from a guest idle at Setup Assistant (1.41 GB in use), and reading the state file is most of the restore time (2.0 s from the host’s memory, 3.7 s from disk).
- assumed That restore also fails while the host is locked, which no run tried. It doesn’t change the recommendation, because under option A, a locked host leaves the VM running.
- assumed That
wb-guestdanswers on vsock the moment the guest kernel answers on the network. No process of ours ran in the guest. X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest? measures it.
What it unblocks
Section titled “What it unblocks”X18-vsock-handoffX18-vsock-handoff: Host-guest socket and descriptor hand-offCan wb-guestd, written in Go, open AFVSOCK sockets in a macOS guest? (I29I29 (closed): X18-vsock-handoff: Host-guest socket and descriptor hand-offX18-vsock-handoff (added to S11-verification-and-spikes in #14)) step 4, X03-network-pathX03-network-path: Network pathA macOS guest boots on the file-handle attachment with the gVisor stack: gets a DHCP lease, resolves only allowlisted names, reaches only the proxy. (I17I17 (closed): X03-network-path: Network pathDoes a macOS guest boot on the file-handle network attachment with the gVisor stack: get a DHCP lease, resolve only allowlisted names, and reach only the proxy?) and X05-fs-benchmarkX05-fs-benchmark: Filesystem benchmarkData disk with default versus relaxed write-through settings, against the host, on the NFR02-fs-speed workloads. (I19I19 (closed): X05-fs-benchmark: Filesystem benchmarkHow does the data disk perform with default versus relaxed write-through settings, against the host, on the NFR02-fs-speed workloads?), which build on this VM prototype, and the warm start work in S06-vm-lifecycleS06-vm-lifecycle: VM Lifecycle, Images and the Guest AgentHow guest images are built, how VMs are kept warm, how projects and sessions map onto guests, and what wb-guestd does..
Details and glossary
The numbers stop at the guest kernel. A freshly installed macOS guest runs nothing of ours, and the host may not write into a guest disk after its first boot (B44-data-disk-durabilityB44-data-disk-durability: What may the host do with a guest's disks, and how much of the data disk may a crash lose?Write a new security control now that the host never mounts or parses a disk after the guest has booted from it.). So the spike timed the guest’s network stack answering a ping on the file-handle attachment. A vsock connect is no signal: the host side of the device refuses connections to closed ports within 30 ms of start, before the guest kernel runs.
Fresh clones are the honest case. Restoring a state just after saving it took 2.0 s, because the file was still in the host’s memory. After an idle period it isn’t, and a fresh APFS clone behaves the same way: 3.7 s.
A cold boot comes close. The guest answers the network 5 s after a cold boot, but the rest of its startup is still running then. The restored guest has finished starting up.
Bound to this Mac. Apple’s header says a saved state only restores on the host that wrote it, and can stop working after a macOS update. A saved state can’t be shipped in an image. A restore that fails for one of these reasons deletes the state and cold boots. One that fails because the identifier is in use or the host is locked keeps the state.
- Saved state: a file with a paused VM’s memory and device state, which restores the VM where it left off.
- APFS clone: a copy that shares disk blocks with its original until either one changes, so it takes no time or space to make.
- Machine identifier: the identity Virtualization gives a macOS VM, stored in the VM bundle.
- vsock: the host-guest socket, a direct channel between host processes and the guest that doesn’t go through the network.
- p50, p95: the median, and the value 95% of runs stay under.