Repository navigation
Configure sparse VM disk capacity with a 64 GiB default - #246
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.make test.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
lsblkanddf -h /.Checklist
make testpassed, and I recorded the validation results above.