VMware Communities
lahmefc
Contributor
Contributor
Jump to solution

Expanding Disk Space in VMware for macOS (APFS Container Resize Error)

Hello everyone.

I want to expand the disk space, so I went into VMware settings and expanded disk capacity from 40GB to 80GB. It told me to then handle the partitions for it to take effect inside macOS.


I launched and went to Disk Utility and see this

pastedImage_3.png

I cannot resize the blue area for some reason, but I can highlight the "Free Space" area and delete it, which then makes the desired effect happen:

pastedImage_4.png

Clicking "Apply" leads to the following error...

pastedImage_2.png


Back to square 1. I went into Terminal and brought up diskutil list. Here are the results:

pastedImage_5.png

So I want to expand disk0s2, used the following command: $ sudo diskutil apfs resizeContainer /dev/disk0s2 80 (80gb is what I have set in VMware settings)

I also tried $ diskutil apfs resizeContainer disk0s2 0

Both yield the same error:

pastedImage_1.png

Any thoughts on what I may be doing wrong or how to successfully add space to the partition?

Time machine is not enabled and there are no local backups to delete, I've run those commands in case (I've seen that as the solution across the web, no go for me)

1 Solution

Accepted Solutions
ColoradoMarmot
Champion
Champion
Jump to solution

This may be a long shot, but can you add even part of the empty space to the partition?

View solution in original post

7 Replies
ColoradoMarmot
Champion
Champion
Jump to solution

This may be a long shot, but can you add even part of the empty space to the partition?

lahmefc
Contributor
Contributor
Jump to solution

Holy smokes you've gotta be joking - it worked! Wow! The amount of time I spent trying to figure out workarounds, almost rebuilt the entire VM. Thank you good sir!

To anyone reading this in the future, the only thing different I did was move from 40gb to 50gb. Operation successful. Moved to 75gb, operation successful. Moved to 80gb. Successful. All done in Disk Utility.

So try adding in smaller pieces at a time. Jumping from 40gb to 80gb in one go did not work.

Can't believe that was the issue! Woohoo! Solved.

stratician
Contributor
Contributor
Jump to solution

Thanks Iahmefc - I had exactly the same problem and you're right, increasing the partition in small amounts worked!. It's so strange who vmware doesn't let you change the partition in the amount. In my case, I made increments of 5Gb at a time.

0 Kudos
tbpoisb
Contributor
Contributor
Jump to solution

Hello but ok nice to hear but what command line did you exactly use? I tried both from the org. post , see below ,  but they didn't t work for me.

$ diskutil apfs resizeContainer disk0s2 10

$ sudo diskutil apfs resizeContainer /dev/disk0s2 10

these are the ones I tried.

where did I go wrong or did I forget something?  

this is mostly my error:

Error starting APFS Container resize: The chosen size is not valid for the chosen file system (-69850).

tips wanted.

0 Kudos
MacNut21
Contributor
Contributor
Jump to solution

This suggestion worked for me.  In Disk Utility go to Partition, then enter a Size that's about 10GB larger (than the current size).  Click Apply, then Continue.  Repeat - until you've repartitioned to the desired larger size.

0 Kudos
HURH
Contributor
Contributor
Jump to solution

You are missing the units (G for gigabytes)

sudo diskutil apfs resizeContainer /dev/disk0s2 10G

0 Kudos
wardmw
Contributor
Contributor
Jump to solution

Thanks for the response, it got me pointing in the right direction.

For me not number worked, I just got complaints that such-and-such a disk was invalid for this disk, however 0 did it!

$ sudo diskutil apfs resizeContainer disk0s2 0

This resized my VM disk to use the extra space available.

A note for anyone else coming here in search of answers, you need to expand the disk using the VM configuration first, then use the above command to tell the OS to use up the new space.

 

0 Kudos