Hi,
I am trying to get the details of the following
1.How to find out Whether a Server has ESX installed on it ?
2.How to find the list of VMs running on the ESX server ?
3.HOw to find out what is the vmware software running on the server ?
Are there any APIs for finding this information ?
Hi,
welcome to the VMware communities.
You can use VMware vSphere PowerCLI to answer you questions. PowerCLI is based on Windows PowerShell. So you need that as well.
1. To connect to an ESX server you can use the Connect-VIserver cmdlet:
Connect-VIserver <YourESXServer> -Credential (Get-Credential)
If you can do this, you will know it is an ESX server.
2. To find the list of VMs running on the ESX server you can use the Get-VM cmdlet:
Get-VM
3. To find out which vmware software is running on the server you can use the Get-VMHost cmdlet:
Get-VMHost | Format-List *
This gives you the version and the build of the ESX software, among many other properties.
Regards, Robert
run vmware -v for esx version and for vm's esxcfg-info get vm should work
Hi Robert ,
Thanks for ur reply.
Does Vsphere expose any APIs instead of CLI to retrieve this the above information ?Like any JMX Apis or webservice APIs to retrieve the information ?
The VMware vSphere API is exposed entirely via PowerCLI. So everything you can do in the API you can do in PowerCLI.