VMware {code} Community
atrockz
Contributor
Contributor

Is there UUID for all Inventory objects?

Hi,

Just wanted to know is there UUID for inventory objects like Datacenter, Cluster, Resource pool, folder ? I am able to get UUID for VM and HostSystem but i am not sure whether other Inventory object has UUID. I have seen that we can create multiple Clusters with same name on different DC and also multiple Resource Pools with same name under different parent in a VCenterServer. How do i identify a particular object, what is their unique identifier? I have also read that each object get a unique MOR identifier but it is only for a session. I am looking for something accross a session. Can someone tell me how can i do this. Thanks in advance.

3 Replies
njain
Expert
Expert

Hi,

The UUID is not available for all inventory objects. In this scenario, the hierarchical location of these entities becomes important.

You may use Managed Object ID (MoID) to uniquely identify the object. The MoID is unique for the object's lifetime in the inventory and not just for a single session. For example, when you create a resource pool, it gets its unique ID. Now, till the time you delete this resource pool from vCenter/ESX inventory, it will continue to hold the same MoID throughout the multiple sessions.

Hope this helps.

Neha

Reply
0 Kudos
atrockz
Contributor
Contributor

Oh!! so you mean "value" property of ManagedObjectReference for an inventory object will be unique for the whole lifetime of an object in a VCenter but it might differ if i directly connect to a ESX ?

Reply
0 Kudos
njain
Expert
Expert

Yes, the value property of ManagedObjectReference (also known as managed object ID) for an inventory object will remain unique for object's lifetime in the vCenter inventory.

However, these IDs will not match in vCenter and ESX inventory for the same object. For example, if you look at the managed object ID of a datastore in ESX inventory, it will differ from the ID fetched through vCenter inventory for the same datastore under same ESX that is being managed by vCenter.