Community Pick: Many members of our community have endorsed this article.

HOW TO: VMware Snapshots :- Be Patient

Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)VMware and Virtualization Consultant
CERTIFIED EXPERT
EE Fellow, MVE, Expert of the Year 2021,2017-11, Scribe 2016-2012, Author of the Year 2018-6,2013-2012 VMware vExpert Pro, vExpert 2022-2011
Published:
Updated:

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 hear from 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.

*******************************************************************************************************************************************

63
58,393 Views
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)VMware and Virtualization Consultant
CERTIFIED EXPERT
EE Fellow, MVE, Expert of the Year 2021,2017-11, Scribe 2016-2012, Author of the Year 2018-6,2013-2012 VMware vExpert Pro, vExpert 2022-2011

Comments (18)

Denver IT ManagerIT Manager

Commented:
Sorry Andrew, I meant to post that on a different thread:  https://www.experts-exchange.com/questions/28986920/VM-Virtual-machine-disks-consolidation-needed.html

That should clear up the comment I made:  My question is, should I go with what VMware told me to do or go with what Andrew swears by?  

You mentioned in the thread I referenced that you should not do a consolidation, but rather do a manual snapshot, wait a couple minutes, and then delete the snapshot.
CERTIFIED EXPERT
Fellow
Expert of the Year 2021

Author

Commented:
Please post a NEW question, and we can discuss your current issue.
CERTIFIED EXPERT
Fellow
Expert of the Year 2021

Author

Commented:
Answered!

Commented:
Yea In the vm datastore I see many xxx0001.ctk.vmdk
Shall I delete them manually ? Will this delta snapshot  
Caused vm OS got stuck in one area can't boot into the os ?

View More

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.