I created an OSX High Sierra guest in Virtualbox. It works great, but I made my vdi file a bit too small (40Gb). I enlarged it to 60Gb, but of course that is just the Virtualbox side of it, ic it's the Virtualbox software offering OSX a larger (virtual) harddrive. Now I still need to increase the file system size on OSX and that's where I run into trouble.
If I run Disk Utility on OSX I see a "Free space" partition and my existing High Sierra partition. If I delete the Free Space partition then my existing partition automatically takes up the whole 60Gb of the pie chart. Awesome! But when I press "Apply" I get "Operation failed". The detailed text shows me;
Volume could not be unmounted
Using live mode
...which might still be normal. It's my root volume after all. But AFAIK OSX can enlarge it's root filesystem while the OS is running (depending on what actions you use in the Disk Utility tool, there's a warning saying the OS may freeze for a couple of seconds).
But then further on in the error Details I get this;
Resizing
MediaKit reports partition (map) too small. If you recently grew your whole-disk, you should run whole-disk repair.
Operation failed...
...but then when I run First Aid on the volume I get zero errors.
I tried not enlarging my primary partition of 40Gb and simply creating a 2nd partition of 20Gb from the space I added to the vdi file ...but I get the same error.
I read about the gparted trick but that works on physical drives, as far as I understand. Not sure how I could get that to work on a virtual hrd drive within Virtualbox.
Any ideas on what to try next?
Thanks!