Skip to content

Configure sparse VM disk capacity with a 64 GiB default - #246

Merged
themartiano merged 3 commits into
mainfrom
codex/configurable-disk-capacity
Sep 22, 2026
Merged

themartiano merged 3 commits into
mainfrom
codex/configurable-disk-capacity

Conversation

@themartiano

@themartiano themartiano commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

What changed and why

Users can now configure maximum disk capacity beside CPU and RAM in Resources. New launcher settings default to 64 GiB. A larger capacity is applied to the stopped VM on its next launch; APFS allocates host storage as the guest writes data, and the guest expands ext4 on boot. The maximum does not reserve that much Mac storage.

Existing disks never shrink. Blank values and older saved preferences retain their capacity; Use Defaults selects at least 64 GiB and preserves larger existing disks. The launcher validates the capacity before storage access, then grows an existing disk under its workspace lock after checking its boot kit. A native helper checks the open disk's inode, owner, permissions, link count, and original size before extension, without requiring Python in packaged apps.

Related issue

Closes #104, #132, #244. The existing Apple Silicon/QEMU/HVF/ext4/APFS architecture is unchanged.

Validation

Host: Apple Silicon (arm64), macOS 27.0.

  • make test: passed on the final 64 GiB change, including 344 Swift tests, guest contracts, shell integration suites, and 16 disk-maintenance/growth integration tests. This builds the native helper.
  • git diff --check: passed.
  • Coverage includes old preference decoding, the 64 GiB default and launch environment, preserving larger capacities, invalid input, refusing shrink operations, sparse allocation, data/metadata preservation, active workspace locks, and invalid boot kits.
  • Earlier sandboxed verification of this feature hit permission errors in a local Unix-socket test and the default Clang module cache. The full test suite passes outside the sandbox; workspace module-cache paths are configured by make test.
  • No guest/runtime dependency pins or checksums changed. Full packaged-app assembly, installation, and an actual enlarged guest boot have not been run; this worktree has no staged guest/runtime artifacts. No production VM was resized.

UI evidence

Pending upload. Actual native Resources before/after renders were captured locally with an AppKit test harness. A rendered-state walkthrough exercises invalid input, valid input, and Use Defaults; it is not a full-app screen recording and predates the final 64 GiB default. The GitHub browser session is signed out, so attachments could not be uploaded. PR-only media is not committed.

Reproduce with the built app: open Resources → Configure, check the 64 GiB default, enter a capacity below the current size and verify Save is disabled, enter a larger capacity, Save, and relaunch. Also check that Use Defaults retains a VM already larger than 64 GiB. Capture comparable before/after app screenshots and a short interaction recording, then boot the grown guest and verify lsblk and df -h /.

Checklist

  • I read CONTRIBUTING.md and kept this PR focused on one problem.
  • I explained what changed and why, and linked any required prior discussion.
  • make test passed, and I recorded the validation results above.
  • For changed build inputs, relevant component builds passed and pins/checksums were reviewed with their validation (or I explained why not applicable).
  • I updated documentation for changed usage, requirements, output paths, or security boundaries (or I explained why not applicable).
  • I attached before/after screenshots for UI changes (or stated there are no UI changes).
  • I attached a short video for motion, timing, transition, or interaction changes (or explained why not applicable).

@themartiano
themartiano marked this pull request as ready for review September 22, 2026 09:46
@themartiano
themartiano merged commit a6fb13e into main Sep 22, 2026
2 checks passed
@themartiano
themartiano deleted the codex/configurable-disk-capacity branch September 22, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Choose Omarchy disk size

1 participant