Hi,
How to get cluster name in which an ESX Host belong to, by logging into ESX Host using vSphere Client or SSH console.
Regards
Susanta
hi -- I could go as far as getting the names of other ESX hosts in the farm but not the farm name by SShing into the ESXi host - not sure if this is even possible by connecting to the ESXi host directly
can you elaborate on the reason why you need this
~Sai Garimella
I assume, you do not want to connect to vCenter from web client or VI client but still you would like to know cluster name.
If this is the case, it is possible by using 3 ways:
1. MOB (Managed object browser) ::Open any browser and try this URL :::"https://<YOUR vCenter IP>/mob" ::You will have to enter VC credentials. Once you logged in you can know everything about your vCenter inventory .
2. By using vSphere API (Either java or perl or power CLI ):: Connect to VC ::navigate pro-grammatically through inventory : and you can list out all the clusters with names :
3. You may have to look into VC database, however I do not know how to point out cluster data directly from database,I will dig into it.
just as supporting information, what are you trying to do?
Save this file as a.ps1
Load up Vmware PowerCLI and run it
Get-VM | Select Name, @{N="Cluster";E={Get-Cluster -VM $_}}, `
@{N="ESX Host";E={Get-VMHost -VM $_}}, `
@{N="Datastore";E={Get-Datastore -VM $_}}
It will show you all VM's the Cluster, ESX host, and Datastore
Don't you need to connect to vCenter to run that script...?
Yes, we have to connect vCenter server first.
"Don't you need to connect to vCenter to run that script...?"
Sadly yes