<

Go Premium for a chance to win a PS4. Enter to Win

x

HOW TO: VMware Snapshots :- Be Patient

Published on
173,691 Points
40,291 Views
59 Endorsements
Last Modified:
Andrew Hancock (VMware vExpert / EE MVE^2)
MVE^2, Expert of the Year 2016-2011, Scribe 2016-2012, Author of the Year 2016,2013-2012 VMware vExpert 2016-2011 27 years of experience.
VMware Virtual Machine Snapshots

Please just let me open and state, if you find yourself with a snapshot issue, and are struggling, please post a question to get an Expert to help you resolve the situation, otherwise you risk data loss. Finally, Snapshots are evil, and one of the most popular questions in the VMware Zone on Experts Exchange.

A snapshot is NOT a backup of a VM; that is a gross misconception.

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.  

VMware Snapshots are really designed for patching a vritual machine, testing and then rollback if the patch did not function. It is not recommended to leave a virtual machine running on a snapshot vritual disk

1. performance when using a snapshotted disk is worse than normal
2. if the snapshot delta virtual disk runs out of datastore storage space, the virtual machine will fail.

How do I know if I have a snapshot?

1. Check the Virtual Machine, Right Click the Virtual Machine, Click Snapshot

Virtual Machine Snapshot2. Are they any Snapshots listed

Snapshots Listedin the example above, there is a snapshot listed XenDeploy#1

It is very common, that the snapshot is missing from the snapshot manager window, but the virtual machine is still running on a snapshot, and the sure way to tell, is to look at the contents of the vm folder

Virtual Machine snapshotin the above example, the pink rectangle highlights the parent disk, the red rectangle highlights the current snapshot delta disk.

if you see a virtual machine disk with a -00000x.vmdk it is likely this is a snapshot delta disk. This is the active disk which is being written to, the parent disk is no longer at present being written to. Final confirmation can be confirmed by checking the virtual machine disk properties of the VM.

Virtual Machine Snapshotthe above example, the virtual machine disk can clearly be seen as Windows-7-000001.vmdk, this is a snapshot disk.

I often here from many VMware Admins, but I do not use snapshots, so how did it get there?

BUT, most backup applications, VMware vDR, Veeam Backup and Replication and many more, use the Snapshot API function to backup virtual machines, and can leave a VM running on a snapshot. So check your datastores, setup alerting to advise of snapshots in vCenter Server, use Nagios, vCLI, PowerCLI, many how brew scripts on the market to catch these evil snapshots before its too late.

If you find yourself in a situation with a Snapshot, and you have started the Deletion process, Be Patient, it can take minutes, hours or days to complete, and appear to hang at 95% or 99% with no feedback from vSphere Client.

We have waited 3.5 days for a snapshot to complete, which depends on how large the snapshot, and how fast the datastore the virtual machine is stored on.

So Be Patient, do not fiddle, cancel the process or restart the host, it will complete eventually. Try and Delete snapshots with the virtual machine powered off.

Just to confirm this also checkout this EE Question, which will confirm to be patient!

ESXi snapshot deletion stuck at 99%

I would highly recommend reading these two articles on VMware Virtual Machine Snapshots at the VMware Knowledgebase

Understanding Snapshots  
Snaphot Best Practices

Also check out the following Snapshot Articles by fellow VMware vExpert Eric Siebert

Part 1 : How VMware snapshots work
Part 2 : Deleting virtual machine snapshots without wasting disk space
Part 3 : Troubleshooting VMware snapshots

*******************************************************************************************************************************************
Thank you for reading my article, please leave valuable feedback. If you liked my VMware article and would like to see more VMware Articles from me, please click the Yes button near the: Was this article helpful? at the Top of this article to the right of the Article title. Thank You.
*******************************************************************************************************************************************
59
Comment
11 Comments
 
LVL 38

Expert Comment

by:younghv
Another good example for linking in VM Zone questions.

"Yes" vote above.
0
 

Expert Comment

by:Comptx
can you turn on a vm while a snapshot is being removed?
0
 
LVL 124

Author Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
No, this really is a question!
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 3

Expert Comment

by:Marc Smets
Hit my head against the wall because I too fell in the trap of A snapshot is NOT a backup of a VM; that is a gross misconception.

Very good article, helped me alot in understanding how snapshots work.
0
 
LVL 9

Expert Comment

by:Zacharia Kurian
Andrew, you should combine your great VM articles into a book and get it published. :)

Great real time solutions from you all the time.

Zac
0
 
LVL 124

Author Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
Zac

Thanks for your kind words!

That is actually a work in progress!!!!

The book is delayed though!

Andrew
1
 
LVL 5

Expert Comment

by:onlinerack
Andrew, great article and terrific style.

Keep up the good work (voted YES).
0
 
LVL 124

Author Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
@onlinerack Thanks
0
 
LVL 8

Expert Comment

by:Senior IT System Engineer
Hi Andrew,

Is it possible to expedite the VM snapshot by turning off the VM ?
0
 
LVL 57

Expert Comment

by:Pete Long
Great Article - Well Written.

Pete
0
 
LVL 124

Author Comment

by:Andrew Hancock (VMware vExpert / EE MVE^2)
@Pete Long

Thanks Pete, this was written a long time ago, and is on my list to update a little bit, now 6.5 is out!

Starting that on all my articles at present.

Andy
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Join & Write a Comment

Teach the user how to convert virtaul disk file formats and how to rename virtual machine files on datastores. Open vSphere Web Client: Review VM disk settings: Migrate VM to new datastore with a thick provisioned (lazy zeroed) disk format: Rename a…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month