-
-
Notifications
You must be signed in to change notification settings - Fork 175
feat: Disk resize #593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
balcsida
wants to merge
28
commits into
insidegui:main
Choose a base branch
from
balcsida:feat/disk-resize
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
feat: Disk resize #593
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
- Add comprehensive disk image resizing support for RAW, DMG, and sparse image formats - Implement two resize strategies: in-place expansion and create-larger-image - Add robust error handling with detailed error messages - Include disk space validation and backup mechanisms - Support for both hdiutil and raw file operations
- Add canBeResized property for format compatibility checking - Add resize method with validation and error handling - Add displayName properties for better UI representation - Add resizeDisk method to VBStorageDevice for high-level operations
- Enable size editing for resizable existing disk images - Add resize confirmation dialog with detailed information - Show loading indicator during resize operations - Add informational messages for resizable disk formats - Handle resize errors with proper user feedback
- Add resize icon indicator for resizable disk images - Add context menu with resize option for storage devices - Fix canBeResized method to properly check disk image existence - Add remove device option to context menu for non-boot devices
- Add displayName property directly to VBManagedDiskImage.Format - Add canBeResized property directly to VBManagedDiskImage and VBStorageDevice - Fix method calls in ManagedDiskImageEditor to use proper disk image URL resolution - Simplify resize indicator checks in StorageConfigurationView
- Fix canBeResized to use pattern matching on backing property - Resolve 'managedImage' not in scope compilation error
- Remove direct VBDiskResizer call from UI to fix compilation - Add VBVirtualMachine+DiskResize extension for resize operations - Hook resize check into VMController.start() method - Show informational dialog when resize is scheduled - Handle resize operations automatically when VM starts
gabefair
reviewed
Sep 14, 2025
gabefair
reviewed
Sep 14, 2025
- Move checkAndResizeDiskImages to VBVirtualMachine+Metadata.swift - Remove separate VBVirtualMachine+DiskResize.swift file - Ensures methods are compiled with VirtualCore target - Resolves 'no member' compilation error
- Remove unnecessary guard let for non-optional configuration - Comment out VBDiskResizer call to avoid scope issues - Add TODO for actual resize implementation - Log resize requirement for future implementation
- Re-enable VBDiskResizer.resizeDiskImage call in VBVirtualMachine+Metadata.swift - Fix Timer-based slider confirmation to prevent popup spam - Add 0.5s delay before showing resize confirmation dialog - Complete disk resize feature implementation with actual system tools
- Fix temporary file creation in createRawImage function - Prevent FileHandle error for non-existent temporary files - Consolidate RAW image resize logic in createLargerImage - Properly handle file creation before ftruncate operations - Remove redundant createRawImage helper function call
…ators - Add expandPartitionsInDiskImage functionality to VBDiskResizer - Implement hdiutil attach/detach with diskutil resizeVolume for partition expansion - Add support for RAW, DMG, and Sparse image partition expansion - Add resizingDisk state to VMState enum with UI progress overlay - Update VirtualMachineSessionView to show resize progress indicator - Improve ManagedDiskImageEditor confirmation message - Add comprehensive logging for resize and partition operations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add resizingDisk case to VirtualMachineControls.swift button state logic - Add resizingDisk case to VirtualMachineSessionView.swift state display logic - Ensure all VMState switch statements are exhaustive after adding new state - Both UI components now properly handle the disk resize progress state 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Skip Apple_APFS_ISC containers when finding resize target - Prioritize main Apple_APFS containers for partition expansion - Fixes issue where resize targeted small ISC container instead of main data container 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Detect when recovery partitions prevent main container expansion - Add specialized resize strategy for layouts with recovery partitions - Try multiple diskutil methods to handle partition repositioning - Fixes resize failure when recovery partition blocks container growth 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Acknowledge that recovery partitions may block immediate expansion - Provide clear logging about expected behavior for fresh macOS VMs - Focus on successful disk image resize rather than forced partition expansion - Recovery partitions in VM environments have complex layouts that may limit expansion 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Attempt to delete recovery partition to allow main container expansion - Recovery partition will be recreated by macOS when needed - Fallback to boundary-aware resize if deletion fails - Better handling for established macOS installations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Add findRecoveryContainer to extract container reference from diskutil output - Use correct container identifier (e.g., disk6) instead of partition (disk4s3) - Add -force flag to deletion command for recovery containers - Better logging of container detection process 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
- Detect when recovery partition is protected by System Integrity Protection - Provide clear user guidance for manual partition adjustment - Acknowledge successful disk image resize even with partition limitations - Suggest Recovery Mode approach for full space utilization 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
074ccc3
to
4a0c580
Compare
Thanks, @gabefair for the review comments! Current status: Tested this with Tahoe VM, currently works with non-FileVault enabled disks, working on a way to make it work with FileVault enabled disks as well |
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.
This is still in progress, unpolished, vibecoded mess