VMware Communities
Fred_3_0
Contributor
Contributor
Jump to solution

Is there ANY way to throttle the size of a VM?

I have a Windows 10 VM in Fusion 10.1.2.  It is constantly gobbling space on a 256GB SSD.  I just deleted the latest snapshot, and it is STILL using 50GB.  I have 60GB "allocated" from the original installation. Unfortunately, it was a tech who did that and he didn't ask me first. AFAIK, I can't change that now.

I only run three Windows based apps on the VM, but they are mission critical and I would like not to have to go buy a dedicated Windows laptop just to run them. That would mean having to travel with two laptops.

Any ideas? I have looked and looked, but most discussions quickly devolve into a techie group rap that makes no sense to me at all.

1 Solution

Accepted Solutions
ColoradoMarmot
Champion
Champion
Jump to solution

First, backup the VM to an external drive (not time machine!)

Next, don't use snapshots and disable auto protect.  Shut down the VM (not suspend) and delete any snapshots.  Those two should stop the growth.

Next, inside the guest:

1) Go to the control panel, search on 'restore' and turn off system restore for drive c.  Remove any restore points.

2) click the search icon in the bottom tool bar, type 'disk cleanup' then right click on it and choose 'run as administrator'.  Check all the boxes and clean up the disk.

3) shut down (not suspend) the virtual machine, go into the VM settings, then general, then clean up virtual machine.

Assuming that it's not a preallocated disk, it'll shrink.

If it is a preallocated disk, after doing the above you may be able to go into the disk settings, and un-check preallocated.  You may also have to toggle the 2GB chunk setting to trigger the disk rebuild (it's been a while since I've done that).

View solution in original post

Reply
0 Kudos
7 Replies
GovJim
Contributor
Contributor
Jump to solution

OK.  Here is the problem.  You can shut down the vm, open the "Settings" for the vm and give it a different disk size.  BUT BEFORE YOU DO THAT...realize that you will need to reinstall everything.  YOU WILL LOSE EVERYTHING YOU HAVE. (Because the guest OS partitions may be bigger than the new size that you give the disk in VMware and that really confuses things! For example...You have a 100G "C" drive but you tell VMware that the virtual machine will have a 50gb disk. Even if not, it gets real ugly real quick).

There are some pretty long and complicated ways you can do this, but it will take some techie group rat explanation so that may not be for you. (They involve shrinking the windows partitions, adding disks, copying, etc, but again, it is pretty long, involved, and very technical!

The easiest way would be to get the technical folks to re-create the vm's with smaller disks sizes (if possible) so that you could fit all three onto your laptop. Or perhaps get your folks to give you a bigger HD on your laptop?

Sorry I am not giving you better news Smiley Sad


jim

Fred_3_0
Contributor
Contributor
Jump to solution

Thanks Jim.

(BTW, it's fine that it's not great news. An answer is an answer and even one I don't prefer is way better than spending hours trying to find a better one that I probably wouldn't understand even if I did.)

Unfortunately, it's a MacBook Pro, and the drive is soldered onto the motherboard, so upgrade isn't option.  Next time I'll drop the extra dough and get the bigger drive, but for the moment I'm stuck.

Since I posted this it has occurred to me that maybe I could just move the VM to a SSD, run it from there and just delete the VM that's gobbling up internal drive space. Would that work or am I just gumming up the works with that too?

Thank you for your help. Very much appreciated.

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

First, backup the VM to an external drive (not time machine!)

Next, don't use snapshots and disable auto protect.  Shut down the VM (not suspend) and delete any snapshots.  Those two should stop the growth.

Next, inside the guest:

1) Go to the control panel, search on 'restore' and turn off system restore for drive c.  Remove any restore points.

2) click the search icon in the bottom tool bar, type 'disk cleanup' then right click on it and choose 'run as administrator'.  Check all the boxes and clean up the disk.

3) shut down (not suspend) the virtual machine, go into the VM settings, then general, then clean up virtual machine.

Assuming that it's not a preallocated disk, it'll shrink.

If it is a preallocated disk, after doing the above you may be able to go into the disk settings, and un-check preallocated.  You may also have to toggle the 2GB chunk setting to trigger the disk rebuild (it's been a while since I've done that).

Reply
0 Kudos
Fred_3_0
Contributor
Contributor
Jump to solution

Wow!  Thanks Jim. I ran that process on a desktop and reduced the VM size from 90GB to 24GB :smileyalert: and then on my laptop, which reduced from 50GB to 28GB.  (Not sure why the desktop reclaimed so much and the laptop proportionately less.) 

If I now copy that 28GB VM onto an external SSD, can I run it directly from the external? Or, maybe I can leave the settings as you suggest and stop the bloat that way? I can probably live with a 28GB VM, but I want it to keep its girlish figure and stop expanding.  I keep all of the data that the VM accesses on an external drive (backed up 3 ways), and the apps are easily reinstalled in the event of a drive failure. It's just software so I don't really care if I have to reinstall it.  I guess Im just wondering if there would be a performance degradation if I ran it off a USB 3.0 SSD.

Thanks so much for your help!

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

I run that same process after every patch tuesday, so while it may grow by a few GB each month while I use it, it comes back down to a steady state.  Windows update leaves a lot of gunk :-).  Autoprotect is the biggest disk hog.

You'll definitely see a hit over USB 3.0, especially during the boot.  once it's running it'll be ok.  The danger is pulling the cord while the VM's up - that's a sure way to corrupt the virtual disk.  If you do that, I'd keep a separate backup (just copy via finder is fine) to save hassle if it croaks.  That's a good idea anyway, as we've disabled a lot of the auto-recovery stuff to save space.  For example, I had the new fusion beta kill a VM on a tools update, but a quick copy back and I was able to start over.

Fred_3_0
Contributor
Contributor
Jump to solution

Thanks so much Jim. I really appreciate your taking the time to assist. One more question and then I'll leave you alone...

When you copy the VM, do you just copy and paste the whole "Windows 10 x64" file as is, or do you have to do something in addition to make sure that it's bootable from Fusion?

Reply
0 Kudos
ColoradoMarmot
Champion
Champion
Jump to solution

First shut down the VM (not suspend), then just copy the entire bundle (.vmwarevm extension).  If you start the copy you'll get a question 'did you move or copy this vm'.  Choosing move will keep everything the same.  Choosing copy will change some of the virtual devices and may trigger windows reactivation.

Reply
0 Kudos