Link to home
Start Free TrialLog in
Avatar of dmoss123
dmoss123Flag for United States of America

asked on

vmware vsphere snapshot best practices

According to a VMWare Knowledgebase article one should not use a snapshot for more than  24-72 hours and you should not have more than 2-3 snapshots in a chain. I have been using VMWare Workstation for running my software development environment for the past couple of years and have consistantly violated those recomendations without any problems. When I do development using VMWorkstation, the first thing I do is create an initial snapshot. Then everytime I complete a major portion of code I take another snaphot. Throughout the process of developing an application I can easily have a dozen or more snapshots in a chain.

Our company also runs some of its production servers on VMWare VSphere.  We are about to start using it for running our development and staging servers as well. Will we run into problems if I use snapshots in VSphere in the same manor I have been using snapshots in VMWare Workstation?

Knowledge Base Article on Snapshots


Avatar of Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Andrew Hancock (VMware vExpert PRO / EE Fellow/British Beekeeper)
Flag of United Kingdom of Great Britain and Northern Ireland image


A snapshot is NOT a backup of a VM; that is a gross misconception.  Here are some notes that I took from a VMWare seminar that better explains what a snapshot is:

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.  

I highly recommend reading these 2 articles on snaps:

Understanding Snapshots - http://kb.vmware.com/kb/1015180
Snaphot Best Practices - http://kb.vmware.com/kb/1025279
It's not a good idea, to run production on snapshots for long.

But if you do, make sure you have enough datastore space.

and Be Patient, if you ever decide to committ or revert, because it can take many hours depending on how large the snapshot and datastore speed is.
The main reason why VMware make these recommendations, is because your workstation hard drive space is usally larger than a VMware datastore. A datastore can also hold many Virtual Machines ina  production environment, and if the datastore space becomes low, ALL Virtual Machines on the production datastore will be effected.

Provided you maintain, and control the disk space you shouldn't have any issues.

However, one caveat, deleting or reverting to snapshots can take a while, and have performance impact on the Virtual Machine that the snapshot is operated on, and also other Virtual Machines on the datastore and on the server.

We have a few development companies that code and test in this way. But (and they have now learnt), they had one department, which deleted all snapshots on 25 Virtual Machines, at the same time.

Because of the "storm" hitting the datastore, it flatlined the server! Causing not only their development envirnonment to suffer, but all the other Production Servers, Exchaneg DCs etc

So they now use SSDs, with much higher read and write throughput to avoid this issue.

I would recommend

1. seperate ESX server for development.
2. or beware of the pitfalls, and don't all delete snapshots at the same time.
Avatar of dmoss123

ASKER

hanccocka,

It is very easy to break a SharePoint installation. Also it is very cumbersome & error prone to undeploy changes made in SharePoint. Eventhough snapshots are not meant to be backups they make the development process much more efficient. I can revert to a clean SharePoint installation in about 15 seconds. For this reason I think we will only run off of snapshots on our single SharePoint development server.  SSDs are great I use them with VMWare Workstation on my laptop. I don't think I'll be able to justify a seperate ESX server to my boss at this point.
Yes, I understand the benefits, and if used properly, they work very well, jjust be cautious of there use and neglect - this is when the issues happen.
"dmoss123"...to answer your question - "Will we run into problems...", YES!...*if* you don't keep an eye on the VM. You can 1. run out of datastore storage space and thus not be able to power on/reboot that VM or any VM on that datastore and 2. you are limited on the # of snaps in a chain (32), and even though that's a lot, approaching double-digit snaps, IMO, can lead to VM file corruption. The Best Practices KB, as you noted, explains the potential issues that having multiple chains, for multiple days/weeks can cause. Using snaps can be a good thing if used properly. We have assisted so many EE posters who have had problems with their infrastructre for the very fact of letting the snaps 'go'.

Regards,
~coolsport00
As I am new to VSphere I'm going to do more research on using SharePoint with VSphere before moving forward.  Would the following make sense? If I reach a point in my development that I would like to be able to easily revert back to, instead of creating a snapshot, I would create a template.  To revert back to that state I would delete my virtual server and re-create it from the template.
SOLUTION
Avatar of coolsport00
coolsport00
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for all of your thoughtfull and useful advice. I will research my options and if I have more questions will post it on Expert Exchange as new question. Thanks again.
Glad to help! :)

~coolsport00
good luck. consumer ssds work very well in esx just a thought.