This post is for a user over at the VMware Community vRops forums, basically the request was for a report which would give he or she the top 10 VM’s by IOPS over 24h for each datastore.

I developed and tested this on vRops 6.3

By using the suite-api this script dumps every datastore and then executes a report against each datastore, trims the values to the TOP 10 VM’s and then merges all the results into a single file.

While the report doesn’t provide 100% what the user wants, it is as close as I can get without lots of work with the suite-api and reporting… if a VM has more than one datastore attached it will appear multiple times on the report as i am using an aggregate value for IOPS. If a VM does have more than one VMDK.. the user will need to determine which SCSI / VMDK is generating the load on that specific datastore by look at the metrics per disk on the specific VM’s.

The first thing that you will need to do is to import my VM IOPS by Datastore view and report xml into vRops (remove the .txt)

vropsimportviewandreport

Once this is done you will need to prepare the script… first you will need to create a new top level folder with 3 folders within called collection, config and reports

So that you don’t keep being prompted for credentials… save the service or user account credentials to a file with the powershell Get-Credential command.

Then create a new file called Top10VMIOPSbyDatastore.ps1 and copy the contents below into it… make sure to update $vRopsAddress,$creds and if required the $ReportID to match your environment.

Once the script is finished you can pick up the file from …\Reports\DatastoreTop10VMsByIOPS-Date.csv , just be aware that a report has been generated for each datastore in the Generated Reports in vRops and you might need to clean up unwanted files.

vropsgeneratedreports