vRealize Operations: Number of VMs by Departments

This blog was contributed by Luciano Gomes, a VMware consultant based in Brazil. He’s got a great nickname: Lucky! Thanks Lucky for the contribution!

It is common for customer to use Folders to organise their Virtual Machines. One of my customers use Folders and Subfolders extensively. They need report the total virtual machines by Department. In addition, they want to know all powered off virtual machines too.

There are several challenges here

  • vRealize Operations understands folder. However, we lose the hierarchy. As you can see below, there is no more subfolders.
  • A Department can span more than 1 folder. This means we cannot use folder. We need to group them. You cannot use vRealize Operations tag as the membership has to be dynamic.

Capture

So let’s create a group that can spans multiple folders and subfolders. Go to the Environment Overview, and then Groups tab. I’ve shown an example below. By the way, you may notice additional tabs besides Groups. That’s part of the new features in 6.1!

Capture 2

Click on the green + icon to create a custom group. Choose the object type as Virtual Machine. I chose the Group Type as Department, and tick the box “keep group membership up to date“.

Capture 2

Now, to get the Virtual Machine in the folder, choose Relationship, then Descendant of, and then choose the folder name. When you type the name, vRealize Operations will automatically select all objects, including folder. You do not have to specify which navigation tree.

I called mine Departments in the following screenshot. To get members from multiple folders, simply click on the “Add another criteria set“, which will result in an OR group membership.

1

Click OK to close it. You will be taken back to the list of groups.

From here, it’s a matter of clicking on the newly created group. It will drill down into this object. On the right side of the screeen, click on your Custom Group. You should see the total number of virtual machines. Yup, that’s all!

2

The above does not include additional info other than the number of VM. My customer needs to answer questions like:

  • How many VMs are powered off?
  • How many Template do I have?

To see more detailed information, we need to create a custom View. View in a special type of Widget, as it is a lot more flexible compared to other widgets. To create a view, click on Details tab (as shown above), and then click on the + icon. The New View wizard will pop up.

Capture

Give it a name.

  • In Step 2. Presentation, choose List
  • In Step 3. Subjects, choose Virtual Machine
  • In Step 4. Data, choose the metrics like below

Click in Show Metrics (see my first arrow, apology for the drawing) – to see the menu as shown below. Choose the metrics (shown in each arrow):

4

Now you will see all virtual machines and templates that you have inside that Custom Group! You can put more information if you need, like Parent vCenter, Parent Host, etc.

Oh, you can also set the time range and export this information to a CSV file, like I’ve shown below:

5

This concludes this simple tip! Have a great day from Brazil!

Leave a Reply