Exploring VSAN APIs Part 5 – VSAN Host Status

Another useful bit of information from a troubleshooting perspective is to be able to quickly get summary of all your ESXi hosts participating in a VSAN cluster. Critical information such as the health, state, VSAN Node/Cluster UUID for each ESXi host can be queried through the vsanSystem using the QueryHostStatus() vSphere API method. To demonstrate this simple operation, I have created a vSphere SDK for Perl sample script called vsanHostDiskMapping.pl.

Disclaimer: These scripts are provided for informational and educational purposes only. It should be thoroughly tested before attempting to use in a production environment.

To show the ESXi host status, you will need to specify a vSphere Cluster running VSAN and use the following command:

Primary Sidebar

Search this website

Author

William Lam is a Staff Solutions Architect working in the VMware Cloud on AWS team within the Cloud Platform Business Unit (CPBU) at VMware. He focuses on Automation, Integration and Operation of the VMware Software Defined Datacenter (SDDC).