VMware Cloud Community
SusantaDutta
Contributor
Contributor

How to find Cluster name without vCenter

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

Reply
0 Kudos
7 Replies
SG1234
Enthusiast
Enthusiast

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

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

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.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
vfk
Expert
Expert

just as supporting information, what are you trying to do?

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
Reply
0 Kudos
JPM300
Commander
Commander

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

Reply
0 Kudos
vfk
Expert
Expert

Don't you need to connect to vCenter to run that script...?

--- If you found this or any other answer helpful, please consider the use of the Helpful or Correct buttons to award points. vfk Systems Manager / Technical Architect VCP5-DCV, VCAP5-DCA, vExpert, ITILv3, CCNA, MCP
Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee

Yes,  we have to connect vCenter server first.


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos
JPM300
Commander
Commander

"Don't you need to connect to vCenter to run that script...?"

Sadly yes Smiley Sad

Reply
0 Kudos