VMware Administrators – How are you taking backups for your Virtual Machines? Still using Traditional Server-client agent based Technology?
As technology transformed to next level, even backup solutions are got transformed.
Snapshot level backups are new solution provided by most of leading Vendors like Symantec – Net Backup, IBM Tivoli, EMC, Veeam, Dell, Unitrends … etc
Now snapshots created by Backup software then who will delete it? your guess is right again Backup software only. But is that really happening? If not your VM will go down 🙁
Today let’s learn about one product Snapwatcher for VMware is a product from Opvizor destined for VMware admins and which allows to monitor, fix and delete VM’s snapshots within single console. Snapshots at the VM level are something that’s really something cool to have, but VMware’s best practice concerning snapshots says don’t use snapshots, or use them sparingly.VMware says that If you need/want to use snapshots, just use them sparingly and don’t keep them for long periods. Snapshots can go wild and you might end-up in a situation when you are unable to delete the virtual machine snapshot due to locked files.
Backup products are using snapshots to backup VMs. vStorage API for Data Protection (VADP) is used allowing to create differential, incremental of full backups without the need to install an agent inside a VM. However the usage of the VADP and the mechanism used causes most of the broken/inconsistent snapshots. Over time you might end-up with orphaned or inconsistent snapshots in your environment if you’re simply using backup software that uses the VMware API for backup. Orphaned snapshots doesn’t show through vSphere client so using a software product like Snapwatcher, which detects broken or inconsistent snapshots and allows you to fix them, just makes a perfect sense.
- Monitor snapshots across VMware infrastructure – can connect to multiple vCenters at a time to give you an overview on snapshots usage, size, history
- Gain precious space on your storage systems – Provides Top 5 by size, to find the most space taking snapshots from within your infrastructure.
- Fixing Broken Snapshots – deletes broken, old and invalid snapshots with single click to gain space.
- Delete VM Snapshots within the main console – several vCenter servers or individual ESXi hosts can be manage with single pane of glass.
Snapwatcher from Opvizor can help in a situation where problematic snapshots prevent boot a VM or there are invalid snapshots by fixing them. It also allows monitoring how much valuable space snapshots are taking in your infrastructure with historical data.
A snapshot preserves the state and data of a virtual machine at a specific point in time.
Snapshots adds also additional files to the VM’s directory. There are <vm>.vmsd and <vm>Snapshot<number>.vmsn files within the same directory.
- <vm>.vmsd – database of the virtual machine’s snapshot information and the primary source of information for the Snapshot Manager. The file contains line entries which define the relationships between snapshots as well as the child disks for each snapshot.
- <vm>Snapshot<number>.vmsn – includes the current configuration and optionally the active state of the virtual machine. Capturing the memory state of the virtual machine lets you revert to a turned on virtual machine state. But those snapshots takes longer to create and takes more space.
To illustrate the architecture of VMware snapshot technology, probably the best way is provide an image:
When you look at snapshots from the average admin’s perspective, it’s something that is cool as a technology. Snapshots allows to use that point-in-time recovery technology to:
- Go back to the point before you have patched your OS or your application
- Go back to the point before you were affected by incompatibility with another product
- Go back to the point before you installed new testing version of custom in-house built app
Snapwatcher Invalid snapshot fix – How it works?
Few words about what is happening in behind the screen when the product is used for fixing invalid snapshots (I asked Dennis Zimmer from Opvizor).
- We check that no backup VM is owning any of the vmdk files that are recognized having snapshots.
- We try first to use the standard remove snapshot functions of vSphere.
- We try then using standard snapshot consolidation function of vSphere.
- If none of these work, we try to find out if any of the files of the VM is locked (via ssh).
- We find the host that is locking the files, connect to the host via ssh to release the files.
- The locked files are never data files!
- We copy the files after releasing the lock.
- Run a standard snapshot consolidation function of vSphere.
- If none of these helps we give up before any data loss can happen and inform you to open a VMware support ticket.
Snapwatcher is one of the products which is new to the market, as in my knowledge there is nobody else having product like this. Small, but efficient, fast on usage and learning curve. There is also a video on Opvizor’s website showing the work with Snapwatcher
As I said in the beginning, snapshot technology is something cool to have as it can save you tons of time when upgrading your VMs from OS or applications perspective. The option to go back (revert to latest snapshot) is great function within the VMware console. But to keep snapshots longer is risky business. Snapwatcher can help to track unused snapshots, delete them or fix broken or invalid snapshots.