Pls assume there is VC server and ESXes that configured HA cluster.
In this environment, I wanted to change one ESX (named ex, ESX-A) to maintenance mode from my application via VI-SDK for doing some config changes to ESX-A.
It's basically works, but if HA is working same time to move VMs to ESX-A, ESX-A is going to maintenance mode but HA is failed.
My expectation for app's behavior is to get an error if HA is running and stop to maintenance mode.
So, I want to add some check code if now HA is running or not.
Does anyone know is there a way to check if HA is running from VI-SDK?
this will tell what objects that you need to monitor.
Basically, from a Host Object, you would find the owning ComputeResource and then follow the data from there.