VMware Communities
fbx
Contributor
Contributor
Jump to solution

How to shrink a pre-allocated VM?

There are dozens of explanations of how to shrink grow-able VMs.

I have a 173GB Windows 7 virtual machine on my iMac OSX 10.6.6 hard drive. I also have a Bootcamp partition of similar size. The VM may have been made from the Bootcamp version, but that was a long time ago, a year or two, and who remembers.

Surely there is some way for me to "shrink" the VM. Either by literally shrinking it, or copying it to another VM, or importing it from a copy into a newly made VM, or by using software such as Carbon Copy Cloner, or Winclone, or some other 3rd party software.

I'd appreciate some suggestions. Anything short of making a new VM and reinstalling Windows (which is what I will do if that turns out to be the ONLY alternative).

Many thanks--

0 Kudos
1 Solution

Accepted Solutions
WoodyZ
Immortal
Immortal
Jump to solution

How to shrink a pre-allocated VM?

From the VMware Fusion UI Hard Disks settings you could uncheck the Pre-allocate disk space check box and then after VMware Fusion is finished converting the disk you could use Shrink from VMware Tools or you can even do as suggested by continuum however consider the following.

If the Virtual Machine in question was a Boot Camp partition that was Imported by VMware Fusion then unless things have changes in VMware Fusion 3.x the virtual hard disk created during the import is the size of the Macintosh HD although the only software in the .vmdk will be that of whatever was on the Boot Camp partition.  Have a look at Re: Counterintuitive Instructions from VMWare on Resizing Virtual Disk for some additional information on the layout of the virtual hard drive in an Imported Boot Camp Partition.

Another approach would be to just image the actual Boot Camp partition in the imported .vmdk by itself to a new .vmdk of the target type you want using Symantec Ghost or similar and this is probably the fastest and easiest way to end up with a growable disk that has been shrunk in one operation.

Additionally you can use VMware vCenter Converter Standalone or Paragon Go Virtual to create a new VM or .vmdk of the required type and this too can just act on the Boot Camp partition in the .vmdk thus eliminating the EFI and HFS+ partitions created during the importing of the Boot Camp partition.

View solution in original post

0 Kudos
6 Replies
continuum
Immortal
Immortal
Jump to solution

try vmware-vdiskmanager

vmware-vdiskmanager -r current-ex-bootcamp.vmdk -t 0 new.vmdk

give full paths and use quotes for filenames with blanks


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

WoodyZ
Immortal
Immortal
Jump to solution

How to shrink a pre-allocated VM?

From the VMware Fusion UI Hard Disks settings you could uncheck the Pre-allocate disk space check box and then after VMware Fusion is finished converting the disk you could use Shrink from VMware Tools or you can even do as suggested by continuum however consider the following.

If the Virtual Machine in question was a Boot Camp partition that was Imported by VMware Fusion then unless things have changes in VMware Fusion 3.x the virtual hard disk created during the import is the size of the Macintosh HD although the only software in the .vmdk will be that of whatever was on the Boot Camp partition.  Have a look at Re: Counterintuitive Instructions from VMWare on Resizing Virtual Disk for some additional information on the layout of the virtual hard drive in an Imported Boot Camp Partition.

Another approach would be to just image the actual Boot Camp partition in the imported .vmdk by itself to a new .vmdk of the target type you want using Symantec Ghost or similar and this is probably the fastest and easiest way to end up with a growable disk that has been shrunk in one operation.

Additionally you can use VMware vCenter Converter Standalone or Paragon Go Virtual to create a new VM or .vmdk of the required type and this too can just act on the Boot Camp partition in the .vmdk thus eliminating the EFI and HFS+ partitions created during the importing of the Boot Camp partition.

0 Kudos
fbx
Contributor
Contributor
Jump to solution

Thanks for this detailed and comprehensive reply. For the moment i have simply made a new VM, but I will try the alternatives you list here. Much appreciate your help.

0 Kudos
fbx
Contributor
Contributor
Jump to solution

Turns out that this:

If the Virtual Machine in question was a Boot Camp partition that was Imported by VMware Fusion then unless things have changes in VMware Fusion 3.x the virtual hard disk created during the import is the size of the Macintosh HD although the only software in the .vmdk will be that of whatever was on the Boot Camp partition.

is exactly the case. It's a 596 GB Bootcamp drive (my iMac drive is 600 or 650 GB).

Looking at the remaining suggestions:

Another approach would be to just image the actual Boot Camp partition in the imported .vmdk by itself to a new .vmdk of the target type you want using Symantec Ghost or similar and this is probably the fastest and easiest way to end up with a growable disk that has been shrunk in one operation.

Additionally you can use VMware vCenter Converter Standalone or Paragon Go Virtual to create a new VM or .vmdk of the required type and this too can just act on the Boot Camp partition in the .vmdk thus eliminating the EFI and HFS+ partitions created during the importing of the Boot Camp partition.

The first is suggesting running ghost INSIDE the (giant) Win 7 VM and from there making a copy of the real content (surely just 30GB max) to either the Mac drive or an external drive or the VM itself?  I assume one of the first two?

And your final suggestion is to use WMWare vCenter Converter Standalone or Paragon Go Virtual (also from within the VM itself?) to clone the content portion of the VM to a new VM?

I wonder if I could trouble you for a bit more step-by-steppy instructions for doing this?

Also, I still have the Bootcamp install and I wonder if it might be simpler just to make a new non-preallocated VM from that?

Thanks again,

0 Kudos
WoodyZ
Immortal
Immortal
Jump to solution

I wonder if I could trouble you for a bit more step-by-steppy instructions for doing this?

If this be the case I'd suggest using Paragon Go Virtual from within the existing Virtual Machine of the Imported Boot Camp partition as the documentation it is easy to follow.

Have a look at: Paragon Go Virtual User Manual

fbx
Contributor
Contributor
Jump to solution

Tried this using the VM (installing Paragon Go Virtual on the VM, then running it) and could not get it to work, likely because I could not understand various instructions, including why it did not have VMWare Fusion as an option for the VM to make, only VM Workstation 7, and what was meant in the first instruction about being sure to select also the HD that you wanted it to host, which I couldn't understand because I'm trying to make a VMWare Fusion VM 7 disk to be hosted on Mac OSX 10.6.6  and why then would I want the host drive (the Mac drive) to be "virtualized"?

Anyway, also tried it on my literal Bootcamp partition (booted into Bootcamp, downloaded and ran Paragon GV, and had similar problems.

Why this must be so maddeningly difficult for me I don't know, but it is, always has been. FOr years now.  I "bought" my first Parallels before it even came out as a commercial product, so I've been at it a while, and I'm still bollixed up. 


Think I'll check if Parallels has since developed an easier way to reduce the size of a Bootcamp partition, or convert it to a smaller virtual machine. It used to be real easy to convert Parallels virtual machine to Fusion VMs.  And who knows, maybe Parallels is less sketchy now.

Thanks anyway, for your efforts to help. Much appreciated.

fbx

0 Kudos