How can we find if an ESX Server s registered under a Virtual Center or not from a remote machine running any flavour of Windows?
Login to your esx server with an SSH client like putty and look at /etc/vmware/vpxa.cfg file
you could find something like this if you esx is connected to a vcenter server :
<vpxa>
<datastorePrincipal>root</datastorePrincipal>
<hostIp>xxx.xxx.xxx.xxx</hostIp>
<memoryCheckerTimeInSecs>30</memoryCheckerTimeInSecs>
<serverIp>xxx.xxx.xxx.xxx</serverIp>
<serverPort>902</serverPort>
</vpxa>
where xxx.xxx.xxx.xxx is your vcenter IP Address.
Bye
Ric
I want to do this programatically and not using putty. i want to know if there are some APis to do this.
Create a Windows Script (batch or vbs) and use pscp to execute the command
less /etc/vmware/vpxa.cfg
grep for the risult and play with it, for example doing an action or another one if the patterns match your request.
If your are using the infrastructure client from this remote machine, you can see if or if not the esx server has a valid license when you click your way to the configuration tab of the server and then look into "licensed features". This can be performed from any remote machine with the infrastructure client installed.
Depending on if you are using a license server you could also perform a status enquiry within the license server ("server status" tab). In the inquiry you can see how many licenses you have and which esx servers has registered themselfs to the license server. This will cost you only a simply rdp session to the license server.
