VMware Cloud Community
dingding
Enthusiast
Enthusiast

How to calculate total active VMs in DRS cluster

in VC, i can find number of VMs (power on + power off) in cluster or in ESX. but i just want to monitor how many VMs are currently powered on in my cluster.

---- Idleness is not doing nothing. Idleness is being free to do anything.
Reply
0 Kudos
2 Replies
BenConrad
Expert
Expert

Here is one way:

Select cluster, select Virtual Machines tab.

File > Export > Export List

This will give you a list of all machines that you can sort by ON/OFF

Ben

dingding
Enthusiast
Enthusiast

just followed your guidance, if you save the list as xml, you can use fomula like below to count powered on VMs:

=COUNTIF(B2:B13,"Powered On")

or if you saved as xml and you have unix tools in windows (e.g. cygwin), you can use below script:

cat vms.xml |grep "Powered On"|wc -l

---- Idleness is not doing nothing. Idleness is being free to do anything.
Reply
0 Kudos