Jump to content

Resize disk #1 in macOS VMs to be full size


3 posts in this topic

Recommended Posts

I have this macOS VM disks issue for a while now, and as I did not find an (easy) way out I am finally asking here.

Using Windows 10 Host OS - 64-bit, on 3 separate PCs (1 is offline right now, Windows issues unrelated to VMware or VMs). 

On the 2 others, I have VMware Workstation 15.1.0 on the laptop (16 GBs of RAM), and 15.0.3 on the other PC (32 GBs of RAM) + latest macOS Unlocker and have multiple macOS Guests, ranging from 10.9 Mavericks up to latest 10.14.5 Mojave.

The VMs work fine as far as other operations go, but on some of these, I have a larger disk size of 120 GBs and on some it is 90 GB or less, so I am running low on disk space due to Xcode and Simulators installed.

I do not want to add a 2nd disk, just up the size of main disk/partition.

So, I tried to use Disk Utility to increase the size of the main (and only) partition to something larger, such as from 84 GBs to 120 GBs/etc but could not do it, it just showed a useless pie chart you cannot resize up (only down).

 

I have been reading on this issue with resizing the VM disks to use the larger capacity (increased in VMware Guest OS Settings), and most sources I found say this is work in progress and macOS (VMs too) may not allow for partition resize via the GUI for that (yet).

And that only Terminal can be used to resize as desired via the command line.


MY questions are:

1) Is there an easy way to resize my main macOS partitions on the several VMs via GUI, such as via the built-in tools OR maybe I third-party tool?
On Windows OS I use EASEUS, AOMEI and many other free disk/partition tools, but most or all of these do not support or work on macOS.

 

2) IF not, what are the correct Terminal commands to up the main (and only) partition size to use the whole amount available, without losing data or apps installed?

 

Thanks for any replies. :)

Edited by Naki
grammar/clarity
Link to comment
Share on other sites

On 6/28/2019 at 3:20 AM, Naki said:

So, I tried to use Disk Utility to increase the size of the main (and only) partition to something larger, such as from 84 GBs to 120 GBs/etc but could not do it, it just showed a useless pie chart you cannot resize up (only down).

 

Example expanding vmdk eg from 100GB to 120GB:

1. Expand vmdk disk by clicking Guest Settings/Hardware/Hard Disk (SATA), click Expand button

2. Attach full macOS installer ISO as a virtual CD/DVD-ROM to the VM.  Choose to boot to it (F2 at the VMware logo to access VMware BIOS boot selection, select to boot from CD.  Note: You may need to edit the virtual machine's vmx file eg with WordPad, to add the line bios.bootDelay = "3000" ---> allows the virtual machine enough time to register key presses during boot up), then open DU in this Recovery Environment.

3. Click the partition button in DU and select Partition, not Add Volume

4. Click the Free Space in the pie chart and then the minus button below

5. Confirm you want to remove the Free Space (by merging with the existing system volume) by clicking Apply, then Partition...

Spoiler

672375489_VMwareExpandSpace1.png.2220a2847ad566badb67d32b59511ba3.png1160924204_VMwareExpandSpace2.png.c81646f97f024c5249e5a6d66198767d.png1454533414_VMwareExpandSpace3.png.dd52edd39cf51013f96b878cc48bf64f.png2131993976_VMwareExpandSpace4.png.9f0b7c9fb4b8955fa68e54b4683358aa.png1644210323_VMwareExpandSpace5.png.35aacbbdb71fa64149aebd954d4670c4.png

 


End Result...

Spoiler

 

203078791_VMwareExpandSpace6.thumb.png.b53aa0b3f8d32c82c7499ad29b9ec544.png

 

 

 

 

9 hours ago, Naki said:

this way of partition resizing works very differently on Windows PCs I am used to, or even on Linux I believe
This did work in 2 out of 3 VMs. On one of those it failed at once with an error.
..

 

As they say, Apple like to Think different ™ :).  Another option is to clone the original vmdk disk to a new, larger disk...

1. Edit virtual machine settings, click add SATA hard disk ---> create a new (larger) virtual disk stored as single file

2. Attach a full macOS installer.iso as a virtual CD/DVD

3. Close the VMware program, then edit the virtual machine's vmx file with WordPad to add the line bios.bootDelay = "3000" ---> allows the virtual machine enough time to register key presses during boot up

4. Start the VM, press <F2> when you see the VMware logo to access the VMware BIOS, choose to boot from the CD

Spoiler

353694113_VMwareBIOSscreenchoosetobootVirtualCDROM.thumb.png.bf70f70450ef3dd9be0fb3e4acfd1142.png

 

5. Open Disk Utility from the macOS Utilities screen.  Click View/Show All Devices.  Click the new, uninitialised VMware Virtual SATA HD from the LHS pane, then the Erase button (can leave volume name as "Untitled", format type as Mac OS Extended).

6. Click the "Untitled" volume from the LHS plane, then click the DU Restore button at the top, choose the volume you want to clone in the "Restore from" box.  For cloning Catalina, you can select either the system volume or the - Data volume ---> both will be cloned together either way.  Click Restore to confirm...

Spoiler

986846436_VMwarecloningCatalinawithDU.thumb.png.dcd23073afd5e4e90de9084138ab50b6.png2080104451_VMwarecloningCatalinawithDU2.thumb.png.552db046a1518434bb62e57fceaf4923.png1938435440_VMwarecloningCatalinawithDU3.thumb.png.934f203295b2cdf9463bb9723a721853.png

7. At the end of the process, quit DU and shutdown the VM.  Edit the virtual machine settings to remove the original vmdk from the VM and detach the installer.iso so only the larger, newly cloned vmdk disk is attached.  Restart the VM to test if it worked (before permanently deleting the original smaller vmdk in the host)! 

 

Here, I have booted my Catalina VM to a newly cloned Catalina DP3 vmdk disk...

1012105336_ClonedCatalinaDP3.thumb.png.1ec6996cbaf26ba1988b7c6c07b6d627.png

 

 

Edited by fusion71au
Operation is more reliable if you boot to a Recovery Environment and open DU, not to macOS on the vmdk disk that needs to be expanded
Link to comment
Share on other sites

  • 2 weeks later...

Sorry for slow update! :)
Thanks for the easy steps, this is not so hard once I knew I had to click the Minus button (this way of partition resizing works very differently on Windows PCs I am used to, or even on Linux I believe).
This did work in 2 out of 3 VMs. On one of those it failed at once with an error.

 

I will try the 2nd means you give, with a 2nd disk attached to the VM that failed the resize. :)

Edited by Naki
Link to comment
Share on other sites

 Share

×
×
  • Create New...