KhaosT / MacVM

macOS VM for Apple Silicon using Virtualization API
Apache License 2.0
1.31k stars 95 forks source link

resize disk space... #19

Open mcnahum opened 2 years ago

mcnahum commented 2 years ago

I'm fighting with command line since yesterday to resize the disk to apply the macOS 12.1 update.

with "hdiutil resize -size 80g -imageonly disk.img" I was able to increase the size but inside the VM I don't find the good command to extend the APFS partition

I was betting on "diskutil apfs resizeContainer disk0s2 0" but it's not working ... any idea?

jcrate commented 2 years ago

These commands have let me resize a disk inside a macOS VM hosted on ESXi.

sudo fsck_apfs -n -l /dev/rdisk1
sudo diskutil apfs resizeContainer /dev/disk1 0