[feat] Add safe growth for existing VM disks - #154
Merged
Conversation
themartiano
approved these changes
Sep 8, 2026
themartiano
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the pull request!
Codex comments
Reviewed locking, backup verification, inode checks, and growth-only behavior. Full tests passed, including all 14 resize tests. Existing live APFS validation is documented.
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.
Summary
Existing VM disks default to 24 GiB, and choosing a larger factory-image capacity does not enlarge an existing installation. Add a source-checkout maintenance command that grows a stopped VM without resetting its data:
The command reuses the launcher's workspace lock, metadata checks, and paired-boot validation. It requires APFS, checks host headroom, retains checksum-verified disk and boot backups, and extends only the validated disk inode. It refuses active VMs, shrinking, unsafe paths, and unrecognized storage. Equal-size requests are no-ops. The existing guest boot service expands ext4 on the next launch.
Custom locations use an explicit
--state-root; this command does not read the app's location preference or support legacy development workspaces. It needs Python 3 but no app rebuild. The README covers capacity limits, backup retention, and recovery.Related to #104 and #132. Complements draft #141, which configures capacity for new/reset VMs and explicitly excludes resizing existing disks. This provides a command-line maintenance path that a future UI can build on.
Validation
make testwith the Xcode developer directory selected, including 14 new resize tests.bash -nandgit diff --check.e2fsck -fnpassed after shutdown; filesystem metadata reports 8,388,608 blocks of 4,096 bytes (32 GiB).No factory-image inputs or native app code changed. The isolated boot used an existing built runtime; this change does not require a new factory build.