How to get VM’s instanceUUID using vSphere REST API?

This post was originally published on this site

Articles like these tell me that I should uniquely identify VMs and other objects in vSphere by their InstanceUUID + MoRef ID:

https://blogs.vmware.com/vsphere/2012/02/uniquely-identifying-virtual-machines-in-vsphere-and-vcloud-part-1-overview.html
https://blogs.vmware.com/vsphere/2012/02/uniquely-identifying-virtual-machines-in-vsphere-and-vcloud-part-2-technical.html
https://www.virtuallyghetto.com/2017/07/uniquely-identifying-vms-in-vsphere-part-3-enhanced-linked-mode-cross-vc-vmotion.html

 

But I can’t find a way to get instance UUIDs using the API. The https://[vSphere hostname]/rest/vcenter/vm/vm-1234” endpoint does not return it.

 

How can I get the instance UUID from the REST API?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.