Identifying issues with and setting up DNS name resolution on ESXi Server
search cancel

Identifying issues with and setting up DNS name resolution on ESXi Server

book

Article ID: 310760

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

The errors listed in the Symptoms section are generated as a result of name resolution issues.
 
This article guides you through identifying issues with name resolution which can seriously impact the normal operation of ESXi, particularly in HA clustered environments. The article also details correctly configuring host files when there is no DNS server in the environment, or if the DNS server is incorrectly configured.



Symptoms:

  • Unable to configure VMware High Availability (HA).
  • Configuring VMware HA fails at about 97% completion.
  • Configuring VMware HA fails between 85 to 91%.
  • Reconfiguring VMware HA fails.
  • Adding an ESXi host to a cluster fails.
  • Enabling VMware HA in a cluster fails.
  • These errors are generated when attempting to configure VMware HA:
     
    • An error occurred during configuration of the HA agent on the host
    • HA agent on <ESX> in cluster <cluster> in <Datacenter> has an error
    • Error: Cannot complete the configuration of the HA agent on the host. Other HA configuration error
    •  
  • Host fails to remediate or exit Maintenance Mode.
  • You see these errors:
    • Operation timed out
    • Unable to connect to the MKS: Host address lookup for server failed: No such host is known
       
  • In the Tasks view of VirtualCenter/vCenter Server, you see the error:

    There are errors during the remediation operation
    Failed to find host

     
  • From the vCenter webclient you might see this error:
    vSphere HA host status
  • Update Manager is unable to scan ESXi hosts.
  • Host disconnects from the vCenter Server.
  • ESXi host enters a not responding state in the vCenter Server.

    Note: A common cause for an ESXi host dropping out of vCenter Server is due to the DNS (both forward and reverse) not functioning or configured correctly.



Environment

ESXi 6.x,7.x,8.x

Resolution

Identifying issues


There is a problem with name resolution if any of these tests fail. ESXi hosts must be able to find each other by:

  • IP address
  • Short Name
  • Fully Qualified Domain Name (FQDN)


If an issue with name resolution has been identified it must be resolved either on the DNS server or by using hosts files.


  1. Verify that all ESXi hosts can ping each other by short name. All ESXi hosts in the environment must be able to ping each other by using short name only. For more information, see Testing network connectivity with the ping command (341078).
     
  2. Verify that all ESXi hosts can nslookup each other.

    Use nslookup (reverse IP address lookup) to verify that the appropriate name is associated to a particular IP address.

    For example:

    [root@esx-server-1 /]# nslookup 192.168.0.5
    Server: 192.168.0.7
    Address: 192.168.0.7#53

    5.0.168.192.in-addr.arpa name = esx-server-2.example.com

     
  3. Verify that all ESXi hosts can reverse nslookup each other.

    Use nslookup (forward IP address lookup) to verify that the appropriate IP address is associated to a particular name.

    For example:

    [root@esx-server-1 /]# nslookup esx-server-2
    Server: 192.168.0.7
    Address: 192.168.0.7#53

    Name: esx-server-2.example.com
    Address: 192.168.0.5

     
  4. Verify that the DNS server has both an A Record (Address Record) and a C NAME record (Canonical name record) configured for each ESXi hosts.

     5. Verify that the managing vCenter does not have any improper entries in its "/etc/hosts/" file for the targeted ESXi host.

 

Configuring hosts files on ESXi

The hosts file on the ESX host is located at /etc/hosts .

Open the file for editing using a text editor such as nano or vi .

Example hosts file:
 

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost

# Any line beginning with a pound sign is a comment and will not be read.
192.168.0.5 esx-server-1.example.com esx-server-1
192.168.0.6 esx-server-2.example.com esx-server-2

# The VMware Virtual Center Server must also have an entry here
192.168.0.20 virtualcenter.example.com virtualcenter


Notes:

  • localhost must always be present in the hosts file. Do not modify or remove the entry for localhost .
  • The hosts file must be identical on all ESXi hosts in the cluster.
  • There must be an entry for every ESXi host in the cluster.
  • Every host must have an IP address, Fully Qualified Domain Name (FQDN), and short name.
  • The hosts file is case sensitive. Be sure to use lowercase throughout the environment.


Additional Information