VMware {code} Community
sahmed24
Contributor
Contributor

how can i get object of ResourcePool

Hi

i am unable to get managed object reference to a resource pool. If i do the code below i get the reference to a resource pool (i dont know which resource pool is that one)

ManagedObjectReference resourcePool

= _connectVCenter.Cb.getServiceUtil().GetMoRefProp(crmor, "resourcePool");

where cmor is MOB to computer resource.

So how can i get the MOB to a resource pool inside host.

Tags (4)
Reply
0 Kudos
1 Reply
admin
Immortal
Immortal

Hi Sahmed,

By default, every compute resource has ResourcePool object associated with it. Each resource pool, which is created in the inventory can be retrieved using the "resourcepool" property of this ResourcePool object from the Compute Resource. The resourcepool property specifies an array of resource pools which are added in the inventory. Hence, in order to retrieve the Managed object of the resource pool which you want, you would need to drill one level further down.

I hope this helps you!

Reply
0 Kudos