Create a new view in vRealize Operations to show powered off VMs

After several large data center migrations to consolidate our data centers, we realized we had a lot of leftover garbage in the vCenters that was moved as part of our project. We needed a quick way to view VMs that had been powered off for a long period of time, in our case over 180 days. This would tell us the VM had been off for at least 6 months and most likely was no longer being used. So I created a new view in vRealize Operations to show us just that!

The New View in vRealize Operations

We start by logging into vROPs and going to Visualize -> Views

new view

Then we need to create a new view to give us our data. Give the view a name and we want to select “List” as our presentation. Our subject will be “Virtual Machine”. Now that data is where we get to the good stuff. Let’s start with our first metric “Summary|Reclaimable Powered Off”. This is going to be the star of the show and allow us to gather the powered off data.

Powered Off Metric

We want to set the Transformation of that metric as Average and No Timestamp. Then you can go to the Time Settings tab and select “Relative Date Range”. This will tell it how many days you want to get from our view. For example, mine is set for 180 days.

Time Settings

You can skip Breakdown by as we don’t need to change anything there. Now Filter, is where we need to filter out our powered off metric. We only want to show those VMs that are off for our time frame set in the last step. You want to add the metric -> Summary|Reclaimable Powered off -> Minimum -> is -> 1.

metric filter

Once you have added that, you’re done. You can play with the time settings to adjust to your needs and add any other filters you think are helpful. For example, we have added filters to ignore templates, and ignore certain tags that we know are VMs that are exceptions to the powered off cleanup.  Creating a new view in vRealize Operations doesn’t have to be a daunting task. Play with it for a while and try to get the data you need. The most important pieces are the metrics you use and how you filter out the data.