How to resize my macOS virtual machine hard drive if there are no reflecting changes in my guest macOS partition?
One can still extend a virtual hard disk size, however, a guest macOS (macOS virtual machine) partition size will remain the same.
NOTE: Make sure you have a backup copy of this virtual machine before you do the following.
For macOS 10.15 guests and above
1. To change the size of the virtual machine open its configuration > Hardware > Hard disk:
2. Click Properties and move the slider to the desired amount
3. Click Apply to save changes. A notification regarding the necessity of making a backup of the virtual machine will appear. Click Continue to apply changes.
4. After the virtual disk resizing, the guest macOS will treat the disk as a larger one, so the overall disk capacity will be increased. So, open Disk Utility inside the macOS virtual machine and click Partition icon:
5. When asked whether to add a Volume or partition device click Partition:
6. Click Free space partition > - . The Free space partition will be removed and this space will be automatically added to Macintosh HD partition.
7. Click Apply.
For macOS 10.14 Mojave guests
After the virtual disk resizing, the guest macOS will treat the disk as a larger one, so the overall disk capacity will be increased. Now you need to do the following:
1. Open Disk Utility in macOS VM (Finder > Applications > Utilities > Disk Utility)
2. Select Macintosh HD and click Partition
3. When asked whether to add a Volume or partition device click Partition
4. Click Macintosh HD partition, enter new desired partition size and click Apply
Now the disk size is correct in the guest macOS:
For macOS 10.13 High Sierra guests
1. Open Terminal in guest OS (Finder -> Applications -> Utilities -> Disk Utility) and execute the following command:
diskutil apfs list
2. Find the disk name in APFS Physical Store Disk field. In our case it's disk0s2, copy it somewhere:
3. Combine the following command:
sudo diskutil apfs resizeContainer <disk_name> <desired_disk_size>
Where <disk_name> is the name of the disk from point 2. and <desired_disk_size> is the disk size you want to set for this virtual machine. In our case when we want to enlarge disk0s2 to 90 GB the command will be:
sudo diskutil apfs resizeContainer disk0s2 90GB
NOTE: you will be prompted to use your password. There will be no symbols shown while typing, so you just need to hit the keys and then Enter/return
For macOS 10.12 Sierra guests and older versions of macOS
Follow the same instructions as for Mojave guest.
If for some reason, you are unable to expand the virtual hard drive, an alternative solution would be to create a new virtual hard drive of the desired size and install macOS from your original virtual machine's recovery partition to that drive.
To do that, perform the following steps:
- Shut down your virtual machine (Actions > Shut down). If it is in a suspended state, resume it and then shut down.
- Open the virtual machine's Configuration: click Parallels icon || > Control Center > right click on the virtual machine > Configure.
- Go to Hardware > + > Hard Disk and select the desired size.
- Go to Boot Order and enable Select boot device on startup.
- Run the virtual machine. Once you see a black screen, press any key on the keyboard to enter boot device menu.
- Use the arrows to naviget to the "...Recovery" option and press Enter.
- The system will enter recovery mode. Once in recovery mode, press Reinstall macOS > Continue.
- When presented with a choice of disk to install macOS to, select the new disk and press Continue.
- Installation will begin. Once the installation is over, macOS will boot into the original installation. Shut down the virtual machine, open virtual machine's configuration > Hardware > Boot order and user the arrows on the right-side to move the new disk (most likely, Hard Disk 2) to the top.
- Run the virtual machine. It will boot from the newly created drive, while the original virtual machine's drive will be connected as a secondary one, so you would be able to transfer all the necessary data from it.
- Once all the data has been transferred, feel free to remove the original drive: in virtual machine's configuration go to Hardware, click on the original drive and click "-" > Move to Trash.