Count Running Virtual Machines on Datastores
Found another good candidate for a PowerVI script at vNiklas.djungel.se.
If you are running too many VM´s on your datastores in your vSphere environment you can have some problems, this if your SAN is not VAAI compliant and can handle SCSI locking etc.
Alan Renouf has made a blog post about how to get a report about how many VM´s you have on every datastore, I have extended to only report on running VM´s as these are the interesting number..
I would alter his script slightly for use in PowerVI.
#--name Virtual Machines Per Datastore
#--multi --hideoutput
#--origin PowerSE
Get-Datastore |
Select Name,@{Name="TotalVMs";Expression={@($_ |
Get-VM).Count}},
@{Name="PoweredOnVMs";Expression={@($_ | Get-VM | where {$_.PowerState -eq "PoweredOn"}).Count}},
@{Name="PoweredOffVMs";Expression={@($_ | Get-VM | where {$_.PowerState -eq "PoweredOff"}).Count}},
@{Name="SuspendedVMs";Expression={@($_ | Get-VM | where {$_.PowerState -eq "Suspended"}).Count}} |
Sort Name |
out-GridView
4 months ago - link

