VMware Cloud Community
colonel_claypoo
Contributor
Contributor

Can't log in to vSphere Client via hostname

Hi there,


I'm new here and a total beginner.

I want to start learning virtualization with VMWare and was wondering if you could help me out.

I managed to install ESXi5 on a seperate machine.
I configured the static IP, Gateway, DNS and gave the machine a hostname.

Then I went and downloaded the vSphere Client.

The issue I'm having is that I can't connect to my ESXi5 host by entering the hostname. I can only login with the hosts IP-address.

When I run the "Test Management Network" on my ESXi5 host
it can ping address #1, 2 and resolve the hostname which I named "esx1.home.com"

I have the vSphere Client installed on a Win7 machine that connects to the internet via a Vodafone EasyBox ISR.

The ESXi5 host is also connected that the same ISR.

I suppose my problem has to do with DNS.

DNS is managed by Vodafone I think. So on my ESXi5 host I entered the ISR's IP-address as the DNS which is 192.168.2.1, same with the Gateway.


However, I can't log in with the vSphere Client with the hostname "esx1.home.com".


What am I doing wrong?

I appreciate the help.

Thanks.

6 Replies
julienvarela
Commander
Commander

Hi,

Indeed this seems to be a problem with name resolution.

Try to add your ESX into your host file on your Windows 7.

Edit C:\Windows\System32\drivers\etc\hosts and add  "@IP ESX1.home.com".

And try to connect again.

Julien.

Regards, J.Varela http://vthink.fr
0 Kudos
colonel_claypoo
Contributor
Contributor

I have to take back what I said before. I ran the "Test Management Network" test multiple times in a row on my ESXi Server. It seems that with the first run, the test is able to resolve the host name. However, every subsequent attempt tells me that resolving the host name failed. So the problem must be something else that what can be done by altering the hosts-file on the Windows 7 machine that runs vSphere Client.

Any Ideas? I suppose it has to do with not having my own DNS server and relying on the ISP DNS function?

0 Kudos
a_p_
Leadership
Leadership

It actually depends on your ISP router capabilities and whether it can learn host names. Usually these devices cannot do this, and without a working DNS server, name resolution won't work. Your options are either to connect to the host using it's IP address or configure the host entry (as mentioned before) on the Windows 7 client, so it can resolve the host name.

André

0 Kudos
colonel_claypoo
Contributor
Contributor

Thanks.

But doesn't the problem also pertain to the ESXi configuration? I mean if the "Test Management Network" option in the ESXi  console can't resolve the host name that I assigned, how can another machine resolve it, regardless of modifying the hosts-file?

Perhaps I have to name my host "localhost" or some default value?

0 Kudos
a_p_
Leadership
Leadership

The name resolution itself is unrelated to a system's real name. As long as the name resolves to the proper IP address you are fine. The host itself doesn't require a proper name resolution unless you add it to a vCenter Server environment (in which case you'd usually have you own DSN server in place).

André

0 Kudos
colonel_claypoo
Contributor
Contributor

Thanks, that makes sense.

It finally worked by editing the hosts-file. Thanks so much a.p. & julienvarela.