VMware Cloud Community
vaibhavgargg
Contributor
Contributor

How to find out the ESXi host version using APIs ?

How can I get the OS version the hosts are running in vCenter ? I know esxcli is one way but that requires ssh into the host.

0 Kudos
4 Replies
muakhtar
Enthusiast
Enthusiast

https://williamlam.com/2016/08/quick-tip-how-to-retrieve-the-esxi-update-level-using-the-vsphere-api...

Munib Akhtar
VCP-DCV/VCP-DTM/VXRAIL
Please mark help full or correct if my answer is use full for you
0 Kudos
vaibhavgargg
Contributor
Contributor

I went through this, this is only possible if there is a vm on that host. In case there are no vms present on the host we can't use this method to get the host version

0 Kudos
IRIX201110141
Champion
Champion

Query the vCenter with the help of powercli (or maybe REST API)?

Regards,
Joerg

 

0 Kudos
lamw
Community Manager
Community Manager

Not sure what you mean by that, both vCenter and ESXi have vSphere API endpoints that can be used to find the details you're looking for. It has nothing to do with whether ESXi host has VMs ... If you've got vCenter, then thats easiest and https://williamlam.com/2017/08/powercli-script-to-help-correlate-vcenter-esxi-vsan-buildversions-wo-... can also help

0 Kudos