Quantcast
Channel: VMware Communities : Discussion List - vRealize Orchestrator
Viewing all articles
Browse latest Browse all 6251

List all Resource Pools that are part of a ESXi cluster

$
0
0

Hello,

I am trying to get a piece of code working that will list all the resource pools that are present in a ESXi cluster.

 

  • I know I can find what resource pool a VM resides to.  I do not want that.

 

// Find a matching resource pool on an ESXi hosts  var esxiCluster = esxiHost.parent;  var esxiClusterResourcePools = esxiCluster.resourcePool_ResourcePool;  System.log("what is the ESXi cluster: " + esxiCluster.name);  System.log("vimtype: " + esxiCluster.vimType);  System.log("what pools exists: " + esxiClusterResourcePools);

 

 

So I know the vimType will come back with what I expect (ClusterComputeResource).  The issue I have is the object "resourcePool" refers to the root resource pool (in my case it is "resources").

What I want is all the DRS resource pools we have setup.  I need something like "resourcePool_ResourcePool.children".

 

Any help is appreciated.

Thanks

B


Viewing all articles
Browse latest Browse all 6251

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>