Saturday, September 22, 2018

Resizing a virtual image in VMware or Parallels

Made the mistake of not allocating enough virtual drive space for OS X image I had setup to work from.  First i had to get rid of all of my snapshots.  This must had corrupted the catalog and disk utility first aid wasn't doing anything to fix it.  Plus when I created the image it was done with HFS instead of APFS.  
But after reading through a few sites on the ways it could be fixed.  As you might have guessed, didn't help.
Before resorting to a commercial product, I was able to come up with a working solution in both VMware Fusion and Parallels Desktop.
Prerequisite
A vm os x image on a dedicated volume
Approach
HFS and VMware – while booting:
command+s
At single mode prompt: fsck -fy
Repeat until there’s no more errors
At prompt: reboot
From terminal as root execute:
/usr/sbin/diskutil resizeVolume / R
Done
HFS and Parallels – Do before booting
In VMConfiguration-> Hardware -> Boot Order > Advance enter the following
devices.mac.boot_args=”-s”
Then boot image
At single mode prompt: fsck -fy
Repeat until there’s no more errors
At prompt: shutdown -h now
In VMConfiguration-> Hardware -> Boot Order > Advance remove the entry
devices.mac.boot_args=”-s”
Boot into vm image
From terminal as root execute:
/usr/sbin/diskutil resizeVolume / R
Done

No comments:

Post a Comment