VMDK Snapshots growng out of control


I have an ESXi 4.0 server setup with one Windows Server 2008 VM.  The VM is a database server so there are constant changes that's going on in the VM.  

I took two snapshots in the system (while it was running): Snapshot0001.vmdk & Snapshot0002.vmdk.  The Snapshot0001.vmdk continued to grow.  I read this forum:


and I deleted Snapshot0001.vmdk.  VMWare merged the snapshot I deleted (snapshot0001.vmdk) into the base vmdk (which I really didn't want it to do), but ok.  I just don't want the files on the datastore to grow.

Now, the second snapshot is growing!!!  The Snapshot0002.vmdk is grew from 10GB to over 20GB and it's still going.  My question:

1. How can I get these snapshots to stop growing?  I just want the snapshot to take up a flat file size.  I want to use it as a Restoration point at a single moment in time, hence a static file.
2. Is there a way, when I delete a snapshot in the middle (e.g. me deleting snapshot0001.vmdk) to not make it merge to the base vmdk file?

Who is Participating?
bgoeringConnect With a Mentor Commented:
1. No - snapshots will continue to grow. Snapshot technology will work as a restore point (that is what they are intended for) and to use it that way instead of deleting a snapshot you revert to the snapshot. I would never recommend keeping snapshots around for very long as disk usage can, as you have found, get out of hand.

2, As for deleting snapshots in the middle, if they are deleted they will be merged into the previous level. This makes sense because later snapshots are always based on all the previous levels. That being the case later snapshots would be invalid if the previous level was just gone. You can revert to any snapshot level and discard later changes.

Good Luck
jhyieslaConnect With a Mentor Commented:
Here is an explanation of snapshots as they relate to the VM world.  I think you are expecting them to be something that they are not.

A snap shot is a way to preserve a point in time when the VM was running OK before making changes. A snapshot is NOT a way to get a static copy of a VM before making changes.  When you take a snapshot of a VM what happens is that a delta file gets created and the original VMDK file gets converted to a Read-Only file.  There is an active link between the original VMDK file and the new delta file.  Anything that gets written to the VM actually gets written to the delta file.   The correct way to use a snapshot is when you want to make some change to a VM like adding a new app or a patch; something that might damage the guest OS. After you apply the patch or make the change and it’s stable, you should really go into snapshot manager and delete the snapshot which will commit the changes to the original VM, delete the snap, and make the VMDK file RW. The official stance is that you really shouldn’t have more than one snap at a time and that you should not leave them out there for long periods of time. Adding more snaps and leaving them there a long time degrades the performance of the VM.  If the patch or whatever goes badly or for some reason you need to get back to the original unmodified VM, that’s possible as well.  
If you want a point in time restoration method you could live clone or backup.. eg VCB. Snapshots are not intended as a long term restoration method.( as you have found)
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

Anything that uses the word "snapshot" is not meant as a long-term copy.
Yeah I would agree with markzz:

If you are trying to get a point in time backup that will not grow and takes up little (as little as possible) disk space clone the VM and use Thin Provisioning.
Something ANY admin worth his or her salt would setup is snapshot monitoring.
It's absolutely critical to have some sort of automated routine to monitor and report on snapshots and more importantly orphaned snapshots.
I use 3 routines but if I had to simplify things I would suggest you all look at snaphunter. It simply a perl script which you schedule via cron, this perl script looks at a simple config file which you edit to suit your requirements.
There are many other routines out there but snaphunter is so simplistic you can have it running a few minutes.
esesjay4Author Commented:
Sorry for the delayed response.  I understand the use of snapshots based on the discussion above.  Obviously, my understanding of snapshots is not accurate.  Thanks for the clarification.

Would cloning the VM at the a given point in time be the best way to back it up?  Basically, I want a backup in case something goes wrong (HDD, OS, etc.).  Also, can I clone a VM with just vSphere client or do I need the vCenter (i'm only using one ESXi server right now)?

One other thing.  I noticed when I deleted the previous snapshot is merged into the base, as confirmed above.  But is there any reason by that base file size grew?  It almost grew 50GB!!!

bgoeringConnect With a Mentor Commented:
Cloning is a good way to back it up. You need vCenter Server to clone a vm. However, you can also use a tool such as Veeam FastSCP (it is free) to copy the files of a vm to a backup location. With the free ESXi the vm needs to be powered off in order to get a consistent copy.

Good Luck
Another possible way to back up a running vm is to use VMware Converter (http://www.vmware.com/products/converter). to "convert" the ESXi vm into another copy.
markzzConnect With a Mentor Commented:
The converter can't be scheduled via the GUI although you could write a script to do all this via the remote CLI but it all becomes so VERY complex.
There are many free tools (scripts) out there already but they are all a mission to use.
I would still suggest vRanger Pro of the like for your situation.
.........Backups and snapshots are really not very important until you need to restore.............

Use a well established and supported solution.
bgoeringConnect With a Mentor Commented:
I need to retract my last statement - apparently the "free" vmware converter will not allow you to convert a running vm unless you go through the "powered on machine" wizard which is much to much trouble - it would still be my recommendation as the free tool to use provided you can power off your vm while it is being copied. Your best bet, however, would be to license the vSphere Essentials (about $500) then either use the built in facilities to clone your VMs, or use an established third party product like Veeam (or vRanger) to make your backups.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.