VMware Cloud Community
JefMitchell
Contributor
Contributor

Adding a host by hostname.

I am trying to add a new host to my cluster by its hostname and keep getting an error.

-VMware ESXi 5-

Error:Cannot contact the specified host (t710-2). The host may not be available on the network, a network configuration problem may exist, or the management services on this host may not be responding.
Error Stack
Call "Datacenter.QueryConnectionInfo" for object "Datacenter" on vCenter Server "vCenter" failed.

I can add it by the IP address just fine, but would like to find out why it wont add by the host name. Any help is greatly appreciated.

0 Kudos
10 Replies
harrygunter
Enthusiast
Enthusiast

Can the vCenter resolve the Hosts name by DNS?

If not you need to update the DNS for the Host, or add the name into the hosts file in vCenter

JefMitchell
Contributor
Contributor

"add the name into the hosts file in vCenter" - How would one go about doing this?

0 Kudos
harrygunter
Enthusiast
Enthusiast

The file is in system32\drivers\etc, called hosts

Open it up with notepad and add the esx hosts name into it following the example within the file.

You should then be able to resolve the Hosts name via the vCenter and add it in.

0 Kudos
JefMitchell
Contributor
Contributor

I'm running the vCenter App. Where can you change the host file in the App?

0 Kudos
harrygunter
Enthusiast
Enthusiast

I'm not running the appliance here but this link looks correct http://www.dashvue.com/2011/11/dns-in-vcenter-server-appliance/

Give it a go.

0 Kudos
a_p_
Leadership
Leadership

I don't have the appliance running at the moment. However, the default location should be "/etc/hosts". That said you may also add the entries in the "/etc/hosts" file on the ESXi hosts. Always add the short and FQDN name.

example:

10.1.1.10     vcenter     vcenter.domain.local

10.1.1.11     esx-1       esx-1.domain.local

10.1.1.12     esx-2       esx-2.domain.local

André

0 Kudos
JefMitchell
Contributor
Contributor

Thank you all for the help. I'll give the link a read and see what I come up with.

0 Kudos
JefMitchell
Contributor
Contributor

I figured it out and here is what I did.

  1. SSH'd into the vCenter using Putty
  2. Navigated to the host files directory
    • cd /
    • cd etc
    • ls (this list everything in the directory)
  3. Used vi to edit the file
    • vi hosts
  4. Added the name and the IP that I wanted to be tied together.
    • xxx.xxx.xxx.xxx name.domain name
  5. Exited vi (vi automatically saves the file when you leave unless specified to not save when you leave.)
    • To exit and save type                Alt + Shift + : x
    • To exit without saving type        Alt + Shift + : q!
  6. Now test it using the Ping command.
    • ping name

Thanks for all the help. Here is the error I was getting for others to find by searching.

Call "Datacenter.QueryConnectionInfo" for object "Datacenter" on vCenter Server "vCenter" failed.

0 Kudos
orthohin
Enthusiast
Enthusiast

Please share the link...

Regards,
Milton

Never trust a computer you can't throw out a window
0 Kudos
JefMitchell
Contributor
Contributor

Share what link?

0 Kudos