I'm running VMware Fusion 10.1.1 on High Sierra.
I have a High Sierra guest and I'd like to shrink the virtual disk to reclaim space.
With Sierra (and older) guests, I would execute the following command inside the guest to shrink the disk:
sudo /Library/Application\ Support/VMware\ Tools/vmware-tools-cli disk shrink /
But when I run that command inside the High Sierra guest (APFS virtual disk), I get the following error:
Partition / is not shrinkable
What command should be used to shrink an APFS disk?
The suggested solution doesn't seem to work for me on 10.15.4 guest. The command runs for a while but then terminates with the message "no free space". The subsequent defrag + shrink has no effect (well, the defrag does run, but shrink completes in half a second and does nothing).
* It may not show anything on the Terminal but eventually you will run out space and get the Out of Space message. Once the temporary file has been removed you'll be back at the command line, shut your Mac VM down.
* Once the Guest is shut down and you go to shrink the VMDK, another message on this thread suggested a defrag and then a shrink. In my testing the shrink does all that is necessary, removing all the zeroed out data.
* Note that if you configure the guest to have the hard disks 'split into multiple files' then you won't need free disk space equal to the total size of the disk, it does one slice/file at a time. You can watch if you right click the .vmwarevm file, and Show Package Contents.