Vmware snapshots

Posted on 2011-02-16
Last Modified: 2012-05-11
Vmware snapshots
if I understand ,In vmware environment , there are 2 types of snapshots. the snapshot done with the built-in function of Vmware.
There is Vranger which is a third party that can take a snapshot image of the Virtual machine.
I would like to know the difference between Vranger and the snapshot built-in function in vmware.
Apparently to restore an image taken by Vranger takes longer.

anyone knows about the snapshots functions I have mentioned above?

Question by:jskfan
LVL 119
ID: 34905364
A Snapshot is a Snapshot, there is no difference between the Snapshot that you create manually, and the snapshot that Quest vRanger triggers to backup the virtual machine. When vRanger backs up a virtual machine, it invokes a snapshot (creates), so VMware ESX server takes the read lock off the main vmdk file, when the lock is removed off the main vmdk file, vRanger can backup this main vmdk file, whilst it is being backed up, changes made in the virtual machine are written to a delta file (the snapshot), after the backup is completed, vRanger closes/deletes this delta/snapshot by merging it with the main vmdk file.

VMware Snapshots allow you to create snapshots for patching, making small changes, so you can roll them back. Snapshots  are not designed to run ion production for a long time, it is not recommended to run production servers for longer than 2 days ona  snapshot.

Quest vRanger is a backup product that produces a FULL backup of the virtual machine, using the VMware Snapshot functionaility.

Author Comment

ID: 34905427
let say I have a VM machine that I want to deploy updates or install an application on it.
I will take a snapshot of it using the built-in vmware snapshot function.
Then after the deployment the VMachine , for some reason, crashes and can't come back up. In this case snapshot previously taken by the vmware built-in function will  help or will not?
LVL 119
ID: 34905466
Yes, this is exactly what VMware Snapshots and Snapshot Manager is for, You take a snapshot before applying changes to virtual machines, e.g. patches, changes etc.

if it doesn't work, you select Revert to Current Snapshot or Go in Snapshot Manager, these diiscards all the changes you've made, and restarts the machine, before the changes, or patches were applied.

If you want to keep the changes you select Delete, and all the changes are merged into the main vmdk disk.
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

LVL 119
ID: 34905480
The reason that Quest vRanger restore takes longer to restore, is because it's copying and restoring the entire virtual machine.

Snapshot is quicker for small changes, but be warned do not let them run out of disk space, and only keep them running for 2 days (no more). You should work on having at least 15-20% additional space for snapshots.

Author Comment

ID: 34905496
So why do companies buy third pary such as Vranger instead of using the built-in snapshit function ?

I also want to know which one is faster in restore operation, Vranger or the Built-in snapshot revert ?

LVL 119
ID: 34905532
SNAPSHOTS are not a backup.

Comapnies purchase Quest vRanger or Veeam Backup to backup the machine.

Snapshots are not designed for backups.

You should obtain a third party backup product for backing up virtual machines, this is the number one question we get asked on EE, Snapshotting is not a backup product.

Rollback is quicker, after patching, than a complete restore, but Snapshot are not a backup.
LVL 119
ID: 34905543
If you use the Snapshot function for Backup, you will get into trouble sooner or later with your virtual machines. Snapshots are not designed to run in production for longer than 2 days, because the size of the delta disk expands.
LVL 119
ID: 34905554

Author Comment

ID: 34905576
As long as you can save the snapshot as a file, then I think it can be used as a backup.
where is the problem ?
LVL 119
ID: 34905600
You cannot save the snapshot file. Although it is a file, you cannot copy it, and it's of no use to you without all the other files and main vmdk.

Author Comment

ID: 34905634
if a VM machine VMDK is 4GB.
The first time you take a snapshot , what will be the size of the snapshot? I guess 4 GB
then you deploy updates , install Apps.
the second time you take a snapshot, the VMDK will be 4.5 GB. what will be the size of the snapshot?
is it going to be 4.5GB or 0.5 GB?

LVL 119
ID: 34905676
When you first take a snapshot the size of the snapshot is ZERO (0), the Snapshot file grows as the data is written to it.

No more data is written to the main vmdk file. All the changes are written to the snapshot file. So it depends on how many data writes are written by the virtual machine.

On an average monthly patch file session, it could be approx 2GB.

The snapshots grow much larger than, that it's not just what data you are adding to the machine, it's ALL the virtual machine writes are being stored, to merge later.
LVL 119
ID: 34905697
I can only advise you, that NOT having a third party backup solution and using Snapshots is a bad idea.

Any VMware Expert will state the same.

Just search EE, and see how many questions we get with Snapshots, when they GO WRONG! and then you have to use VMware Converter because the machines runs out of disk space, machines do not start, a virtual machine can only have a maximum of 29 snapshots. They are problematic, and only should be used for short periods. If you delete a large snapshot, it can take hours, crash the machine, corrupt the machine etc

Author Comment

ID: 34905752
Actually I was not trying to avoid purchasing third pary, but just understanding the difference.
I believe I came up to understand that the Vranger backs up the whole vm machine vmdk file.

so what does the snapshot contains.
As I gave you an example. when a VM machine vmdk is 4 GB, then you take a snapshot and then you deploy your updates and Apps. what is going to be the size of the snapshot ?

and if the VM machine crashes completely, the snapsot would be of any help. if the answers is YES means the snapshot has all files of the vm machine (vmdk).

the other side I have n't understood could be.

VMDK is the initial file when the vm is created and the snapshot is the increment?

LVL 119
ID: 34905793
I understand you are not trying to get out of purchasing a backup solution, but you need to understand, that it is a dangerous practice to rely on Snapshots for Backup.

I have no idea, what size the snapshot is going to be when you deploy apps.

I tried to give you an example, when you download Security Updates, every month from Microsoft the snapshot size is approx 2GB. (now the updates you download from Microsoft every month are not 2GB), but the snapshot records ALL the block changes needed in the VMDK.

Correct, the Snapshot is the incremental.

Sometimes when machine crashes with snapshots, you cannot merge the snapshot file back into the vmdk, so ALL your changes are lost, back to the point when you created the first snapshot, resulting in a VMware machine that may not start due to disk corruption, or all the changes are lost forever.

Author Comment

ID: 34905851
Now it makes me think when you first create a VM machine, a VMDK file gets created, but when you add /increase/decrease things like CPU, RAM, disk. would the VMDK changes in size ?
when you install/unistall a new application  or patches would the VMDK file change in size?

Then comes a snapshot. when you take a snapshot. what does that mean ? are you duplicating the image of the VMDK?
 what 's in the snapshot?

LVL 119

Accepted Solution

Andrew Hancock (VMware vExpert / EE MVE^2) earned 150 total points
ID: 34905885
No the VMDK is a fixed size, if you use thick provision. If you create a 12GB VMDK, it always stays at 12GB, it does not change when you alter CPU, RAM, these settings are stored in the VMX file.

there is a vswap file, which is equal to memory of the virtual machine in the datastore folder as well. So if you change virtual machine memory this file changes. If you alter CPU and RAM, it also updates the nvram file which is also stored in the folder datastore.

But the VMDK does not change size. It contains only the data on partition on the virtual machine.

The snapshot contains the disk writes, that would normally be written to the vmdk, but these are written to the snapshot delta file in stead, it just changes that are written.
LVL 28

Assisted Solution

jhyiesla earned 150 total points
ID: 34905968
hanccocka has done a great job of explaining the snapshot.  As an addendum here are some notes that made from a VMWare seminar about snaps:

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.  
LVL 28

Assisted Solution

bgoering earned 150 total points
ID: 34906768
Just to throw my 2 cents in (so you hear it from more than one place) never use snapshots for backups. Backup products however, use snapshot functionality to "freeze" a virtual disk so that it is in a consistent state to be backed up. Typically all I/O is flushed to disk and suspended for an instant while a snapshot is taken. But the backup product will commit the changes from the snapshot once the backup is complete.

It is a good idea to audit your environment periodically (I do it once a week) to make sure some user hasn't made a snapshot they forgot about because, as hanccocka indicates, it is east to get yourself into trouble when snapshots grow large for a couple of reasons: (1) they do require a fair amount of free space on the datastore in order to commit them (free space that may not be available); and (2) it can take seemingly forever to commit a large amount of snapshot data.

Good Luck

Assisted Solution

cdjc earned 50 total points
ID: 34907509
Everything you ever wanted to know about snapshots ...

VMware Best Practices: Snapshots -

VMware: Understanding virtual machine snapshots in VMware ESX -


Author Closing Comment

ID: 34913890
Excellent explanation Guys

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When converting a physical machine to a virtual machine using VMware vCenter Converter Standalone or vCenter Converter Enterprise, if an adapter type is not selected during the initial customization the resulting virtual machine may contain an IDE d…
In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
Teach the user how to install ESXi 5.5 and configure the management network System Requirements: ESXi Installation:  Management Network Configuration: Management Network Testing:
This video shows you how easy it is to boot from ISO images for virtual machines with the ISO images stored on a local datastore on the ESXi host.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question