The Real (and Virtual) Adventures of Nathan the IT Guy

Sep 23 2011   12:22AM GMT

VMware Snapshots and Templates

Nathan Simon Nathan Simon Profile: Nathan Simon

I created this little guide for a client of mine, and since I did so, it is my property and I wanted to share it with the world. Some people know Snapshots and Templates, and some people do not. This is for those that do not know the damage a run away snapshot can cause… and why choosing to clone a VM to a template is sometimes a better idea… here we go….

When and Why to use Snapshots.

By no means is a snapshot supposed to be used as a backup. A snapshot is great for mitigating risk before doing an update to a VM (Virtual Machine). A snapshot can cause issues if left unattended. For example, if you allow a snapshot or delta file unattended it can continue to grow, it will do so until there is no space left, what this will do is effectively bring every VM on that datastore to a halt. The only way to recover would be to commit that snapshot, and doing so on a full datastore can be very difficult.

When would you create a Snapshot.

You would create a snapshot in these scenarios.

– Before applying security updates and or patches to an OS
– Before installing a major application
– Before attempting the repair of a VM (OS based troubleshooting)
– Before removal of software, in case corruption occurs and you have to use a different method of removal

Removal of snapshots should be scheduled. For example, you create a snapshot, the description should have a short description and a date of when it was created. Once the snapshot is created, create yourself a calendar appointment to remove it a week later, that is probably the longest time you would want to leave a snapshot, any longer, you create the risk or major work being done to the VM and causing the snapshot/delta file to grow out of control.

You would not create snapshots in these scenarios

– You need a backup of an OS
– You are installing a piece of software that you need for a small project and it is intended you roll back to a pristine OS a couple months after.
– Before large DB work, exchange defrags, maintenance, large file transfers, etc.

When and Why to use Templating

Templates allow you to create a pristine copy of a VM without causing any downtime; this VM can then be restored at a later date if needed also the VM can be thin-provisioned to save on space. Creating a template doesn’t just duplicate the VM’s virtual disks, additionally, the VM’s .vmx configuration file is duplicated and renamed with the .vmtx extension, and this means that all the settings behind your VM are being duplicated as well. This saves time by reducing the number of wizards and dialog boxes you need to complete. Note that if a VM is currently in snapshot mode you will not be able to clone it.

When you would create VMware Templates

– When you need a backup of a VM because you are going to be working on it for a long period of time.
– An in place non-disruptive backup of a critical VM
– If you know that you will need to deploy multiple copies of a VM
– When you need a pristine copy of an environment for development testing, ie Install OS, Install SQL, install software package, template, then clone from template, repeat.

When you would not create VMware Templates

– Before applying security updates and or patches to an OS
– Before installing a major application
– Before attempting the repair of a VM (OS based troubleshooting)
– Before removal of software

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: