VMware {code} Community
gilesm
Contributor
Contributor

Can't run QueryAvailablePerfMetric() for datastore MORs

Anyone ever try retrieving the storage capacity performance counters for datastore objects? I've tried to query them and I get an exception from both the QueryAvailablePerfMetric() and QueryPerf() API methods which states the following:

"A general error occurred: an optional value not set."

I assure you all parameters were set along with the ones that require a boolean stating the corresponding parameter was set. When I run this same code for Clusters, Hosts, VMs, and Resource Pools ManagedObjectReferences they work just fine. Is there anythign different that needs to be done when querying performance data for datastore objects? I even tried looking at what is invoked when clicking on the perf tab of datastore objects when running Onyx in the background. Apparently Onyx doesn't like the datastore performance tab as nothing is displayed when I use it. Very weird...

0 Kudos
0 Replies