Add macOS disk resize support#678
Conversation
f5ac0a5 to
2cfd5fe
Compare
2cfd5fe to
5e9a160
Compare
insidegui
left a comment
There was a problem hiding this comment.
Added some comments about the code, mostly just nitpicks.
I couldn't test it yet though, as I couldn't figure out how to access the disk resizing feature. At first I thought the resizing arrow icon was a button, but it's just an indicator, and the ellipsis button that gives access to the disk settings remains disabled for the boot disk, even when it indicates that it's resizable.
|
Strange, it works for me: Cap.2026-05-25.at.22.11.41.mp4 |
|
Thanks for the feedback @insidegui ! |
|
I think I found a bug. It's trying to resize every VM I boot up, even if I haven't changed the boot disk size. In one case, I saw an I think the My suggestion would be to add a flag to the VM metadata indicating that there are disk resizes pending, then bail early in Other than that, I tested resizing a virtual machine using an ASIF disk image from 64GB to 128GB and it worked flawlessly 👌🏻 |
|
Interesting... let me check that |
0c2bdc6 to
6b78500
Compare
|
I was able to fix it and improved the disk resize UX a little bit as well |


What the resize feature does is that when a guest VM starts the next time, before the guest OS boots, VirtualBuddy inspects the guest disk image by temporarily attaching it on the host with
hdiutiland reading the partition layout. If it finds an APFS-on-GPT layout, it treats it as a macOS guest disk and checks for locked APFS volumes / FileVault first:diskutilexpands the GPT layout and the APFS container to match. If APFS does not pick up the new ceiling on the first pass, which sometimes happens, the resizer applies a small shrink-and-grow nudge to force APFS to recompute the available space.