Hello everyone
Has anyone tried to retrieve information about datastores configuration using VRO?
I need to generate a report on all datastores in the VCenter that shows whether they are in Fixed \ Most Recently Used \ Round Robin multi path policy configuration.
Thanks!
Hi,
Here is some sample code showing how to print multipath policy for all logical units in a host:
var lunits = host.config.storageDevice.multipathInfo.lun;
for each (var lun in lunits) {
System.log(lun.policy.policy);
}
To get all the hosts related to a given datastore, use host scripting attribute of the datastore scripting object. Note that this attribute returns array of hosts, not a single host object.
Hi,
Here is some sample code showing how to print multipath policy for all logical units in a host:
var lunits = host.config.storageDevice.multipathInfo.lun;
for each (var lun in lunits) {
System.log(lun.policy.policy);
}
To get all the hosts related to a given datastore, use host scripting attribute of the datastore scripting object. Note that this attribute returns array of hosts, not a single host object.
Thank you Ilian!
Hi,
Another small question ...
How can I get the name of the datastore of every multi path policy?