Who doesn’t love VM snapshots?! They are easy to create, give great value and helps with day-to-day operations. In this post I would like to share a cool VM snapshots vC Ops management trick (spoiler alert: Super Metric will be created )
As most of you already know, although they are very useful, snapshots come with a price as they effects VM performance and can be challenging to manage in large-scale environments.
“The backup application didn’t delete the VM snapshots at night!” – this is just an example scenario I’m sure every VI, storage or backup admin has encountered at some point.
Snapshots size is no stranger to vC Ops, OOTB a Snapshot Space (GB) metric is available for a Virtual Machine Resource Kind.
For that reason we will create a percentage based “Snapshot Used Space” Super Metric, this will show us the ratio between the VM total used space to how much Snapshot disk space is being used which will give us the ability to see snapshot percentage growth over time.
VM Snapshot Used Space (%)
|(This Resource:diskspace|snapshot/This Resource:diskspace|used)*100|
|diskspace|snapshot = Resources > Virtual Machine > Attribute Kinds: Disk Space > Snapshot Space (GB)|
|diskspace|used = Resources > Virtual Machine > Attribute Kinds: Disk Space > Virtual machine used (GB)|
After creating the Super Metric you should add it to a Super Metric Package and apply it on a Virtual Machine Resource Kind. You can follow a previous blog post of mine in order to understand how to do it.
How to use it in a Custom Dashboard?
For the purpose of the example, I will set widgets interactions so the Metric Graph widget will receive its data from the Heatmap widget.
The Heatmap will focus on virtual machines with more then 5% snapshots disk used space and the Metric Graph will be use to show 3 metrics – VM used space in GB, Snapshot used space in GB and Snapshot used space in percentage (which is the Super Metric we created) within the last 24 hours.
Create a Heatmap configuration set using the Super Metric we’ve created earlier. I will Size By the virtual machine snapshot used space in GB and Color By the Snapshot used space in %, for the thresholds 5% will be my lower threshold and 10% will be my higher threshold.
For the Metric Graph all we need to do is to point it to use the Interaction XML and set it to show the last 24 hours data.
Now that we have everything set, select a VM that starts to “color up” so you will get the snapshot trend graph.
As an added value, you can also add OOTB metrics like Virtual Disk commands per second, Virtual Disk Latency and vCPU CO-Stops to the XML file so you will be able to provide more VM performance data on VMs with snapshots attached to it.