VMware Cloud Community
Steven1314
Enthusiast
Enthusiast

How to judge a esx server is vcenter or not?

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

8 Replies
birend1988
Hot Shot
Hot Shot

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.

VCIX, NCAP
0 Kudos
Steven1314
Enthusiast
Enthusiast

Instead of looking into the MOB to fetch VC related details, is there a directly way to get the flag?

0 Kudos
birend1988
Hot Shot
Hot Shot

0 Kudos
ankurgoyal01
Enthusiast
Enthusiast

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

0 Kudos
Steven1314
Enthusiast
Enthusiast

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?

0 Kudos
Steven1314
Enthusiast
Enthusiast

Sorry. I typed wrongly.

I mean how to get the VC flag in Java codes?

0 Kudos
birend1988
Hot Shot
Hot Shot

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.

VCIX, NCAP
0 Kudos
depping
Leadership
Leadership