Is there any api/sdk provided by vmware to know a specified esx server is vcenter or not?
Actually, I want to get this information in JAVA code to decide the message shown on UI.
Thanks
ESXi host is different and vCenter is different. vCenter server is managing the multiple ESXi host.
You can use the MOB to fetch all the host and VC related details.
Instead of looking into the MOB to fetch VC related details, is there a directly way to get the flag?
Hi Steven,
ESX is different from Vcenter.
Vcenter is a centralized solution which hosts all the ESX and ESX is the Hypervisor which hosts the VM.
Regards
Ankur
Thank you for your reply.
If there is a credential(server ip, username, password), how can we use it to judge it is a vcenter or a common esx server?
I mean how to get the vm flag in Java codes?
Sorry. I typed wrongly.
I mean how to get the VC flag in Java codes?
I think API calls will be different to connect ESXi and VC.
Usually we use root account to connect ESXi host and AD users to connect VC. But we can login to the hosts using AD user if ESXi Admin group is part of AD.
William has an example of how to do this using powercli here: