Today we’ll show a built-in tool which can inform you about any VMs that runs on snapshots within your VMware vSphere environment. The built-in tool is simply vCenter Alarms. I know that there are many third-party tools that can inform you about snapshots. One of them is for example Snapwatcher which I reviewed a way back. I’ll list some other tools in this post as well, but today’s focus will be on vCenter Alarms. I realized that vCenter alarms are not used as they could and many admins have also asked questions about alarms. So I think that a post about How to Create vCenter Alarm for VMs running on Snapshots is a good topic for today.
You have the possibility to create Alarms at different levels, but it makes more sense to create an alarm at the datacenter level rather at a host level. You can also create the alarm at the very top, which is vCenter level. The Alarm level hierarchy looks like this: vCenter > Datacenter > Cluster > Host(s) > Datastore > Folder > Resource Pool > Virtual Machine. You needs to be logged in as a user (or admin) which has certain permissions on all relevant objects. If not you’re simply won’t be able to create alarm.
How-to Create vCenter Alarm for VMs running on Snapshots – The steps:
Note that you can configure alarms through C# client (Windows) or through vSphere Web client, and that you don’t see alarms when connecting directly to your ESXi host.
Step 1: Connect to vCenter and select your Datacenter object > Right Click in the white space area on the right > New Alarm.
You can also directly right-click the datacenter object > Menu Alarm > Add Alarm.
As you can see, there is four tabs. You need to configure 2-3 of them, but let’s have a look at all of them.
- General – Enter name for your new alarm (VM with snapshots in my case) and description (optional)
- Triggers – Right click in the free area under Trigger type and select Add Trigger > under Conditions select Is Above. Chose settings with 1Gb and 10 Gb.
- Reporting tab – The reporting tab allows to setup repeating and range, if necessary. You can leave as is or enter a value.
Actions TAB – the last tab allows us to setup which action will be taken by vCenter server. Usually for this case it’s best to get the information to your inbox, but there are other options (if setting up different kind of alamr you may want to have a closer look).
Additionally, I also documented the steps through a very quick video. Check it out.
Note that for the e-mail notification to work correctly you must configure SMTP configuration on vCenter. You’ll find it at the Menu Administration > vCenter server Settings > Mail.
What if I don’t have a vCenter server?
Not always you have all your ESXi hosts “hooked” to your vCenter server. In this case, you can have some third party tools or PowerCLI scripts.
In case you don’t have vCenter server in your environment it means that:
- You’re just running lab/test environment with ESXi hosts licensed with Free ESXi License
- You’ve licensed your ESXi hosts with paid license, but you don’t have a central management. And no High Availability(HA), vMotion, DRS/DPM etc.
Well in those cases you can still use third party tools which can determine if you have any snapshots, but you have to determine this on a per-host level. The example here is with RVTools.
Other tools allowing to detect snapshots:
- vCheck PowerCLI script
- vCenter Orchestrator (which has a built-in workflow to detect alarms). Getting started with Orchestrator is here.
- Veeam One Reporter (licensed)
- Veeam Backup and Snapshot hunter feature, which allows removing snapshot from VMs reporting that they have no snapshots within vSphere! A snapshot delta files present in the datastore. Get Veeam Trial Here.