Skip to content

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)).

running VMmemory + diskswb-vmdpause, save: 3 shost unlockedsaved togetherstate file 1.4 GBsystem diskdata diskidentity, aux storagerestore 1fresh clone: 3.7 srestore 2fresh clone: 3.7 srestore ontodisks that ran onnever

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.

The guest shuts down when the idle period ends while locked. The next session cold boots.

Save every idle VM when the screen is about to lock.

RequirementA. Keep runningB. Shut downC. Save first
NFR01-startupNFR01-startup: StartupGoals: a warm VM reaches the Claude prompt in about 4 s and a suspended VM in about 7 s, and no start takes more than 10 s (p95), excluding first-time project setup and the first boot after a host restart. suspended VM within 7 s to the promptabout 4 s, idle guestcold boot after a lockabout 4 s, idle guest
NFR03-footprintNFR03-footprint: FootprintIdle VMs suspend after a configurable period. idle VMs suspendafter unlockon timeuntested
Detached sessions survive (B46-session-lifecycleB46-session-lifecycle: What happens to a running session when its terminal closes or its VM stops?Recommended that closing the terminal detaches an interactive session, which `wb attach` resumes, that a session ends only when claude exits, and that `wb` exits 255 when it loses a session.)keptendedkept
Spec workS06-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., as writtenS06-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.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., a spike

No SEC* control changes under any option.

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.