Can project homes on a data disk survive a new system disk?
Answered 2026-10-12: yes, with conditions. Decided 2026-10-12: 1A and 2A. The decisions are in the I22I22 (closed): X08-data-disk: Data disk for homesCan guest user homes live on a second disk and survive a replacement of the system disk? comment that starts Decision (2026-10-12):. I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS. measured the assumptions (B228-data-disk-followupB228-data-disk-followup: Does the host-made data volume stay unencrypted and give freed space back?Encryption stays off and the confined format works.). Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement. (I22I22 (closed): X08-data-disk: Data disk for homesCan guest user homes live on a second disk and survive a replacement of the system disk?). Changes S06-03-image-updatesS06-03-image-updates: Image UpdatesHow a VM gets a new image's system disk while its data disk and project users stay, and the guest admin password of each VM., S06-05-disksS06-05-disks: DisksA VM's system disk and data disk: how the data disk keeps what the guest flushes, and how the guest mounts it. and S06-08-projects-and-sessionsS06-08-projects-and-sessions: Projects and Sessions Inside a VMHow projects map onto guest users and sessions onto worktrees, and how Claude Code runs in the guest. and S04-architectureS04-architecture: ArchitectureName the processes, the boundaries between them, and which requirement each boundary serves. (wb-diskfmt). Related: I44I44 (closed): S06-vm-lifecycle: data disk durability, and never mount a guest-written diskS06-vm-lifecycle says the data disk "can be rebuilt from host state plus git, so it may use relaxed write-through settings for speed". (the host-mount control), I138I138 (closed): S06-vm-lifecycle: wb-guestd can't delete a macOS user record (eDSPermissionError)S06-vm-lifecycle says wb-guestd creates, locks and removes project users. (deleting a project user’s record), I135I135 (closed): S06-vm-lifecycle: check claude --continue and the trust prompt across session worktreesThe spec change for #46 (S06-vm-lifecycle, "Projects and sessions inside a VM") gives each session a new worktree at <home/sessions/<session-id. (Claude Code’s state layout in a guest), I218I218 (closed): S04-architecture, S06-vm-lifecycle: one wb-vmd per VM and a fixed install entry, from B64-vmd-sandboxThe maintainer decided the two points of B64-vmd-sandbox on 2026-10-12, in the #64 comment that starts Decision (2026-10-12):. (also edits the S04-architectureS04-architecture: ArchitectureName the processes, the boundaries between them, and which requirement each boundary serves. launcher table). Follow-ups: I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS. (does a host-made volume stay unencrypted and give space back, and does a confined diskutil format), I229I229 (closed): S05-cli: a command that gives a VM a new data diskFound in the review of #227 (X08-data-disk). (a command for a new data disk).
Figure 1. The guest’s own APFS volume needs a key that the new system disk and auxiliary storage couldn’t unwrap. The volume wb-diskfmt makes on the blank image has no such key. The new system disk mounts it, and wb-guestd recreates the users from the IDs wb-hostd kept (X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., S06-03-image-updatesS06-03-image-updates: Image UpdatesHow a VM gets a new image's system disk while its data disk and project users stay, and the guest admin password of each VM., “Updates”).
Both options of decision 1 come with the same guest-side controls 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.: the data volume found by the UUID the host recorded, mounted nosuid and nodev with ownership on, its flags read again before every session, the volume root and every home checked with lstat, and user IDs that the host allocates and never reuses for any project on any data disk of this host.
Decision 1: who formats the data disk?
Section titled “Decision 1: who formats the data disk?”Decision 2: which host process runs the format?
Section titled “Decision 2: which host process runs the format?”With option A, some host process runs diskutil. wb-hostd can’t under its self-sandbox, which starts only the fixed wb-launcher entries, with no arguments (S04-03-self-sandboxingS04-03-self-sandboxing: Self-SandboxingHow each host daemon confines itself at startup, and the wb-launcher that starts confined programs on macOS., “Each host daemon is self-sandboxed”).
Impact
Section titled “Impact”Evidence
Section titled “Evidence”- verified A guest-formatted APFS volume reported “Encrypted at rest”, and on a fresh clone of the image (system disk and auxiliary storage) it failed to mount at boot and by hand (
failed to unwrap volume key). Its own system disk mounted it again. Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., “Answer” part 1,results/boot2.jsonl. - inferred The key needs the old system disk, the old auxiliary storage, or both. The log names xART, which is on the system disk, but every swap replaced both. 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. replaces both on an update, so the design doesn’t depend on which.
- verified A passphrase APFS volume failed to unlock on another system disk (
xart error: -3). Source: “Answer” part 2,results/boot4.jsonl. - verified Without a grant, TCC refuses a USB data disk to every guest process, including root and a launchd job. Source: “Answer” part 3,
results/boot3.jsonl. - verified A host-made APFS volume and a guest-made HFS+ volume mounted on three system disks, and after recreating the users with the same IDs on a fresh system disk, a snapshot of every file and every behavior check were identical. Source: “Answer” parts 4 to 6,
results/snap-boot5-*.txt,results/snap-boot6-*.txt. - verified With a new
GeneratedUID(on g1, a system disk that never had these users), ACL entries that name the user stop applying, and a deny entry then allows. Source: “Answer” part 9,results/check-boot8-c3a.txt. - verified Without
nosuid, a setuid-root file in a home gave a project user root, before the swap and after it. Source: “Answer” part 10,results/boot1.jsonl(guest APFS),results/boot7.jsonl(HFS+ after the swap). - verified macOS refuses to change a user’s
GeneratedUIDor home path once the record has a UID and a group, and settingGeneratedUIDfirst works. Source: “Answer” part 11,results/boot1.jsonl. - verified That the guest never turns encryption on for a volume the host made. It held for four boots here, and for three more on macOS 27.0.1 in I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS., two of them system disk swaps. Option 1A rests on it, and
wb-guestdrefuses an encrypted volume. Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., “Follow-up (I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS.)”. - verified That the host-made volume gives freed space back to the host. I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS. found it does so at each unmount or mount while mounted
nobrowse, and within about 20 s withoutnobrowse. Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., “Follow-up (I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS.)”, and B228-data-disk-followupB228-data-disk-followup: Does the host-made data volume stay unencrypted and give freed space back?Encryption stays off and the confined format works. for the open decision. - verified That
diskutilcan attach and format the image underwb-diskfmt’s profile, which allows only the bundle,diskutil, and the DiskImages, Disk Arbitration and disk management services. Decision 2A rests on it.TestHostFormatran it confined in I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS.. Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., “Follow-up (I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS.)”. - verified The formatting steps of option 1A as 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. writes them. The first spike checked the device by protocol and size with the deprecated
hdiutil attach, not by backing path. I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS.’sTestHostFormatran the steps withdiskutiland checked the backing path at attach and at erase. Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., “Follow-up (I228I228 (closed): X08-data-disk follow-up: measure that a host-made data volume stays unencrypted and returns freed spaceX08-data-disk (PR #227) recommends option A: the host formats the data disk as APFS.)”,results/host-format.txt.
What it unblocks
Section titled “What it unblocks”I44I44 (closed): S06-vm-lifecycle: data disk durability, and never mount a guest-written diskS06-vm-lifecycle says the data disk "can be rebuilt from host state plus git, so it may use relaxed write-through settings for speed". (the data disk settings and the host-mount control), the update path 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., and the project user code of wb-guestd in V1-M2-walking-skeletonV1-M2-walking-skeleton: Walking skeletonwb-vmd boots a fixture VM bundle in its confined process, wb-guestd answers over vsock, a data disk made on the host holds the homes, and wb shell opens a PTY as a project user, with its output through the terminal fi….
Details and glossary
Why the guest’s own volume is lost. On Apple Silicon, macOS encrypts every APFS volume on an internal disk, even with FileVault off, using keys the Secure Enclave guards. In a VM the Secure Enclave is virtual. The data disk looks internal to the guest, so its volume gets such a key. A fresh clone of the image, with its own system disk and auxiliary storage, couldn’t open the old volume.
Why the host’s volume is different. On the host, a disk image is not internal storage, so the APFS volume diskutil makes on it isn’t encrypted at rest. The guest mounts it as it is, and wb-guestd refuses it if that ever changes.
Why the IDs matter. Files belong to a numeric UID and GID, so a recreated user with the same numbers owns its home again. ACL entries name a user by its GeneratedUID instead, so that has to match too. If another project’s user got the same numbers, it would own the old home, so wb-hostd never reuses them.
Why the mount options. Guest root can leave a setuid-root program in a home. If the data volume allowed setuid, the project user could run it and become root, also on a new system disk. nosuid stops that, nodev stops device files, and ownership on makes the guest honor the owners on the volume. Guest root can change the flags in place, but gains nothing, because it is already root. wb-guestd reads them again before each session.
- GeneratedUID: the UUID macOS gives each user and group, used in ACLs.
- ACL: access control list, extra allow and deny rules on a file beyond its mode.
- Auxiliary storage: a VM’s small extra file that holds its firmware settings.
- Disk Arbitration: the macOS service that mounts disks at boot.
- TCC: macOS’s privacy controls, which ask a person or MDM before a process can use protected data such as external disks.
- HFS+: the macOS filesystem before APFS, still supported.