vro obtém todas as máquinas virtuais vsphere vms
var vCenters=VcPlugin.allSdkConnections;
for each (vCenter in vCenters){
System.log(vCenter.name);
var clusters = vCenter.getAllClusterComputeResources();
for each (cluster in clusters) {
System.log(cluster.name);
var vms = vCenter.allVirtualMachines
for each (vm in vms)
System.log(vm.name);
//do your per vm action here
}
}
imtrinity94