VMware Communities
lisfolks
Enthusiast
Enthusiast
Jump to solution

Within VM, Apple_Boot Recovery HD taking up all extra partition space, so can't complete resize

Using VMware Fusion Version 8.1.0 (3272237), I installed OS X 10.11 (El Capitan) via the recovery disk option. The default disk size was 40 GB, but I wanted 250 GB.

When the settings popped up during the VM creation process, I changed the disk size to 250 GB. A message popped up saying that the resize would take place after the VM was rebooted. So, when the VM creation was complete, I rebooted the VM.

The VM file on my host OS shows the right size. So, next step was to go into the guest OS and complete the resize using Disk Utility. However, I kept getting messages about the partition being too large.

Went into Terminal on the guest OS, and listed the drives so I could get the volume name in order to resize at the command line. Found this:

    $ diskutil list

    /dev/disk0 (external, physical):

      #:                      TYPE NAME                    SIZE      IDENTIFIER

      0:    GUID_partition_scheme                          *269.5 GB disk0

      1:                      EFI EFI                       209.7 MB disk0s1

      2:                Apple_HFS ElCapitan_VM              42.6 GB  disk0s2

      3:               Apple_Boot Recovery HD               225.5 GB disk0s3

Note the size of the Apple_Boot Recovery HD partition! It's supposed to be something like 650 MB, not 225.5 GB!!! (Hopefully my formatting remains, as I didn't see a "pre" or "code" option in the editor, and <pre> in the HTML editor didn't work.)

I haven't retried the vm creation yet, since it's a pretty long process. Any idea what might've happened? Or how this can be fixed without recreating the vm from scratch?

0 Kudos
1 Solution

Accepted Solutions
dariusd
VMware Employee
VMware Employee
Jump to solution

We've seen this issue as well, and we have reported it to Apple... It looks like Core Storage gets horribly confused when a disk is "grown", and mistakenly grows the Recovery HD instead of the main partition.  I guess that a "growing hard disk" is something that can only occur in a virtual machine, not on a real-world Mac, so it's perhaps not a scenario that Apple's engineers had considered.

Looking through our internal notes on this issue, we have had an engineer suggest that the problem may be avoided by first shrinking the main partition (in Disk Utility) before growing it to fill the available space.  I haven't tried this out, and I don't know if it can help recover once you're already in the situation you're in.  If it doesn't help you out immediately, you might want to give it a try in a fresh VM.

Hope this helps!

--

Darius

View solution in original post

0 Kudos
2 Replies
dariusd
VMware Employee
VMware Employee
Jump to solution

We've seen this issue as well, and we have reported it to Apple... It looks like Core Storage gets horribly confused when a disk is "grown", and mistakenly grows the Recovery HD instead of the main partition.  I guess that a "growing hard disk" is something that can only occur in a virtual machine, not on a real-world Mac, so it's perhaps not a scenario that Apple's engineers had considered.

Looking through our internal notes on this issue, we have had an engineer suggest that the problem may be avoided by first shrinking the main partition (in Disk Utility) before growing it to fill the available space.  I haven't tried this out, and I don't know if it can help recover once you're already in the situation you're in.  If it doesn't help you out immediately, you might want to give it a try in a fresh VM.

Hope this helps!

--

Darius

0 Kudos
lisfolks
Enthusiast
Enthusiast
Jump to solution

First, installed an Apple Software Update within the vm that included a change to the Recovery partition.

Then, tried shrinking the volume first, but it didn't work. No matter what size I entered, I got the same error:

$ diskutil resizeVolume disk0s2 limits

For device disk0s2 Quadzilla_VM:

        Current size:  42.6 GB (42605699072 Bytes)

        Minimum size:  23.9 GB (23886340096 Bytes)

        Maximum size:  42.6 GB (42605699072 Bytes)

$ diskutil resizeVolume disk0s2 24.0G

... <clipped>

Error: -69742: The requested size change for the target disk or a related disk is too small; please try a different disk or partition, or make a larger change

$ diskutil resizeVolume disk0s2 43.0G

... <clipped>

Error: -69742: The requested size change for the target disk or a related disk is too small; please try a different disk or partition, or make a larger change

Oh, well - heading on to recreate the vm... Thanks for the response, Darius, and I'll hope you get a fix (and that recreating the vm won't just have the same results...)

UPDATE:

- deleted the above vm

- created a new El Capitan/10.11 vm with the default settings

- entered the vm, and updated the vm to the latest Software Updates for El Capitan and the Recovery HD (update reboots VM)

- after reboot, did `diskutil resizeVolume disk0s2 limits` - got 32.8 G

- `diskutil resizeVolume disk0s2 32.8G` successfully shrunk volume

- shut down vm

- in VMware settings, resized HD to 250 GB (keeping default advanced settings)

- re-entered vm, and did `diskutil resizeVolume disk0s2 limits` - interestingly, the current size showed as 32.8 GB as expected, but the max size showed only 32.8 GB also!

- went ahead and did resize anyway: `diskutil resizeVolume disk0s2 250G` - it worked!

Finished partitioning on disk0s2 Macintosh HD

/dev/disk0 (external, physical):

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *268.4 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Macintosh HD            250.0 GB   disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s4

A thought: while resizing the first vm, I had selected to pre-allocate disk space in VMware's Hard Disk settings. I wonder if the recovery disk took up the remaining hard disk space because of that? I used the default settings in this new vm, so though this new vm shows 250 GB, on the Mac side, the size is only 41.5 GB.

[Testing, I went ahead and changed the settings to pre-allocated the disk space after this successful resize: now the Mac side shows 268.44 GB, while the vm's values are the same as above.]

0 Kudos