Skip to content

Does the host-made data volume stay unencrypted and give freed space back?

Answered 2026-10-26: yes, and yes with conditions. Decided 2026-10-26: A, keep nobrowse. The decision is in the 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. comment that starts Decision (2026-10-26):. Source: X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement. (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.). Changes 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. (“Disks”) and S06-13-data-disk-formatS06-13-data-disk-format: Data Disk FormatHow the host formats a VM's new data disk, the one exception SEC15-no-guest-disk-mount makes, and the checks before a VM starts with its disk.. Earlier brief: B22-data-diskB22-data-disk: Can project homes on a data disk survive a new system disk?Yes, with conditions.. Follow-ups: I424I424 (open): fix(conformance): datamount setuid probe and remount restore on a real guestFollow-up of #228 (X08-data-disk, "Follow-up (I228)"). (two conformance checks of C09-guest-and-sessionsC09-guest-and-sessions: Guest and SessionsThe test cases for what a project user can reach inside the guest, wb-guestd's update and the guest clock, the shared toolchain prefix, the guest admin password, and the session lifecycle.), I425I425 (open): X08-data-disk follow-up: check the host-made volume stays unencrypted on a macOS 27.2 guestFollow-up of #228 (X08-data-disk, "Follow-up (I228)"). (a macOS 27.2 guest).

guest (untrusted)project userdeletes 1 GiBdata volume, /private/var/wbhomesnobrowse, nosuid, nodev, ownerswb-guestdmounts at cold bootdata.wbdisk on the hostst_blockson delete: keptat unmount or mount: freed

Figure 1. With nobrowse, a delete in the guest leaves the blocks allocated in the host’s image file. On macOS 27.0.1 they go back when the volume is unmounted (a clean guest shutdown) or mounted again (at a cold boot), not at a restore from saved state. Without nobrowse they went back within 20 s (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.)”).

Decision 3: keep nobrowse on the data volume?

Section titled “Decision 3: keep nobrowse on the data volume?”

nobrowse marks a mount as not for browsing: Finder and other user-facing tools don’t show it. 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. sets it with nosuid, nodev and owners, and wb-guestd refuses a session when it’s missing. No spec or decision gives its reason. Mounting with each option alone showed that nobrowse is the one that holds the space back. A remount during a run isn’t a way around it: once a project user process has run, macOS refuses another mount at the home path until the next boot (X08-data-diskX08-data-disk: Data disk for homesGuest user homes on a second disk, surviving a system-disk replacement., “Answer” part 12).

The space the guest frees goes back at each clean shutdown and at each cold boot, not at a restore from saved state.

Mount with nosuid,nodev,owners, and drop nobrowse from the check before every session.

The case for B. The design rests on the space coming back: NFR03-footprintNFR03-footprint: FootprintIdle VMs suspend after a configurable period. says disk use grows only with divergence from the base image, and 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. says a raw image gives deleted data back. With nobrowse, a long session that writes and deletes build output keeps every deleted block until a clean shutdown or a cold boot, and VMs that suspend when idle and restore from saved state may not do either for days. The specs don’t say what nobrowse protects, and the mount is outside /Volumes already. Without it the space came back within 20 s in every run.

Confidence: medium. A is the stricter option and the one the code and tests check today, so choosing it doesn’t change the code. A finding that Spotlight doesn’t index the volume either way, or reports of host disk pressure from long sessions, would make B the better choice.

RequirementA. Keep nobrowseB. Drop it
NFR03-footprintNFR03-footprint: FootprintIdle VMs suspend after a configurable period. disk use grows only with divergence from the basedeleted data counts until the next clean shutdown or cold bootback within about 20 s
SEC13-bounded-resourcesSEC13-bounded-resources: Bounded resourcesCPU, memory and disk of each VM are capped. the guest can’t exhaust host resourcesbounded by the nominal sizesame
SEC08-proj-isolationSEC08-proj-isolation: Per-project isolationEach project has its own guest user, state and history, and one project cannot persist into another. one project can’t reach another’s stateas written, with a Spotlight window at each cold boot until I429I429 (open): wb-diskfmt: keep Spotlight off the data volume with .metadata_never_indexWhen a guest boots, Disk Arbitration mounts the data volume at /Volumes without nobrowse before wb-guestd remounts it, and in X08-data-disk's follow-up runs that mount created .Spotlight-V100 on the volume.Spotlight on the homes not measured
SEC15-no-guest-disk-mountSEC15-no-guest-disk-mount: The host never mounts a guest-written diskA disk image is guest-written once a guest has run with it attached, and every copy or clone of a guest-written image is guest-written too. the host never mounts a disk a guest usedas writtenas written

Decision 3 was decided A on 2026-10-26, and the spec and the code already do A, so no issue follows from it. The two conformance checks of C09-guest-and-sessionsC09-guest-and-sessions: Guest and SessionsThe test cases for what a project user can reach inside the guest, wb-guestd's update and the guest clock, the shared toolchain prefix, the guest admin password, and the session lifecycle. that fail on a real guest, TestSetuidIgnored and TestRemountRefused, are fixed in I424I424 (open): fix(conformance): datamount setuid probe and remount restore on a real guestFollow-up of #228 (X08-data-disk, "Follow-up (I228)"). either way. I425I425 (open): X08-data-disk follow-up: check the host-made volume stays unencrypted on a macOS 27.2 guestFollow-up of #228 (X08-data-disk, "Follow-up (I228)"). repeats the encryption check on macOS 27.2. I429I429 (open): wb-diskfmt: keep Spotlight off the data volume with .metadata_never_indexWhen a guest boots, Disk Arbitration mounts the data volume at /Volumes without nobrowse before wb-guestd remounts it, and in X08-data-disk's follow-up runs that mount created .Spotlight-V100 on the volume. keeps Spotlight off the volume either way.

Details and glossary

Why space goes back at all. The data disk is a sparse raw file. When the guest’s APFS deletes a file, it can tell the virtual disk that the blocks are free (an unmap), and the host then frees them in the file. X05-fs-benchmarkX05-fs-benchmark: Filesystem benchmarkData disk with default versus relaxed write-through settings, against the host, on the NFR02-fs-speed workloads. measured this for a guest-made volume. On this volume it happens within about 20 s of a delete, and in full at every unmount and mount, except while the mount has nobrowse, when it happens only at the unmount or mount.

Why the two conformance checks fail. TestSetuidIgnored first checks that a setuid-root copy of itself in /private/var/tmp runs as root. Started from the test, it ran as uid 501, while the same copy started with sudo -u ran as root, which points at the test’s way of starting it. On the data volume, nosuid held in every probe. TestRemountRefused cleans up with mount -u -o nosuid, but on macOS that replaces the other flags rather than adding one, so the mount lost nodev and nobrowse and the check refused it.

  • nobrowse: a mount flag (MNT_DONTBROWSE) that keeps the volume out of Finder and other browsing.
  • Sparse file: a file whose unwritten parts take no space on the host’s disk.
  • Unmap (trim): the filesystem telling a disk that blocks no longer hold data.
  • st_blocks: the space a file takes on the host’s disk, which wb-hostd counts.
  • Disk Arbitration: the macOS service that mounts disks at boot, at /Volumes/<name>.