• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1113
  • Last Modified:

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


0
dmoss123
Asked:
dmoss123
  • 6
  • 3
  • 3
2 Solutions
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:

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
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.
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.

 
dmoss123Author Commented:
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.
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
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.
0
 
coolsport00Commented:
"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
0
 
dmoss123Author Commented:
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.
0
 
coolsport00Commented:
Well, you have a couple options...use a snapshot, but watch over it/your VM, or, you could use non-persistent disks. In this manner, any changes you make to your VM are wiped out upon reboot and your VM assumes the same state as it was in when you configured it to be non-persistent. You could create a template of it at the very state you want it in in case a full restore is needed.

~coolsport00
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
Sharepoint with vSphere is fine, you just need to be careful and aware of the pitfalls when using Snapshots.

VMware still recommend the use of VMware Workstation to use for Developers. (because it keeps them off the production server).

I'm still battling with some clients, because some Developers, find it funny, to all delete snapshots simultaneoulsy, to cause chaos! (despite being told!).

Templates are a better option. You can clone a virtual machine, when you've reached a stage.

VMware have products Lab Manager and Configuration Manager, which integrate into  vSphere 4.0 for this purpose, for fast development, but you still need to be careful with Snapshots, and deployments, even if you deploy many templates at once it can be slow, depending upon your datastores choice.
0
 
dmoss123Author Commented:
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.
0
 
coolsport00Commented:
Glad to help! :)

~coolsport00
0
 
Andrew Hancock (VMware vExpert / EE MVE^2)VMware and Virtualization ConsultantCommented:
good luck. consumer ssds work very well in esx just a thought.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 6
  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now