What is a VM snapshot?
Virtual machine (VM) snapshots have their uses – they're handy, for instance, to repeatably return back to a virtual machine's previous state.
When we take a snapshot, we capture the virtual machine's hard disk, hardware and optionally the memory state.
Within VMware, we create three state files:
- Disk files – Delta.VMDK (VMFS5 less than 2TB virtual disk)
- Hardware state – .vmsn
- Memory state – .vmem
These snapshots then allow us to revert back to a previous state if something goes wrong, for example, if a software update fails.
Snapshots best practices
VMware has some best practices for using snapshots.
- Do not use snapshots as back-ups.
- Do not use a single snapshot for more than 72 hours.
- When using third-party back-up software, ensure that snapshots are deleted after a successful back-up.
- A maximum of 32 snapshots are supported in a chain. However, for a better performance use only two to three snapshots.
Why you should limit the number of VM snapshots
The last point is quite interesting: The more snapshots we take, the slower the VM will potentially run, but most importantly, the VM will take up a lot of additional disk space, as the snapshot disk file increases in size.
How to limit the number of VM snapshots
VMware has a setting that we can add to the VMs .vmx file – we set the maximum number of snapshots for a virtual machine by editing the snapshot.maxSnapshots = n variable of the configuration file.
Here's how:
Once we are in the vSphere Client, right-click and edit your VM settings, select VM options and then select Advanced, then locate Configuration Parameters, and select EDIT CONFIGURATION.
Then select ADD CONFIGURATION PARAMS.
Next, type for max of 2 snapshots, and click OK.
Now we can only take a maximum of 2 snapshots against this machine:
Snapshot.maxSnapshots 2
If you would like to learn more, check out our comprehensive catalogue of VMware courses.
Bryan O'Connor
Bryan has been working at QA as one of the principal virtualisation trainers for 13 years and counting, specialising in VMware, but also working with Microsoft Hyper-V, and multiple Cloud technologies.More articles by Bryan
Going Swiss: How VMware training can streamline your multi-cloud systems
Why organisations that want to maximise the ROI of their multi-cloud approach should be considering VMware training.
16 May 2023The benefits and challenges of a multi-cloud approach in 2023
Why multi-cloud in 2023? Bryan O'Connor returns to the subject to outline some of the opportunities, challenges and solutions…
11 May 2023The 3 steps to becoming a VCP-DCV 2023
With the advent of VMware vSphere 8, VMware has released a new exam to demonstrate your skills with the product.
07 June 2023What is the benefit of getting VMware certification?
Why multi-cloud, what are the challenges and how can VMware help?
What is the difference between hybrid-cloud and multi-cloud? Why use multi-cloud for my organisation and what are the challen…
13 November 2020Best practices for managing user accounts in VMware vSphere
In another of Bryan O'Connor's technical VMware blogs, he details the do's and don'ts of adding user accounts in vSphere.
24 August 2021Free VMware resources
QA Senior Technical Instructor, Bryan O'Connor, outlines several free ebooks by VMware.
25 May 2021What is virtualisation?
Bryan O'Connor explains what a virtual machine is and what the benefits of virtualisation are for any organisation.
14 May 2021Basic virtualisation terminology
What is a hypervisor? What is vSphere vMotion? What is HA? Bryan O'Connor, our vExpert, decodes commonly used virtualisation…
18 June 2021VCTA: The new introduction certification from VMware
Bryan O'Connor introduces the new entry-level VMware certification, Certified Technical Associate (VCTA).
27 November 2020