An ESXi host takes a long time to boot when the DNS servers are unreachable
search cancel

An ESXi host takes a long time to boot when the DNS servers are unreachable

book

Article ID: 313067

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • An ESX/ESXi host takes minutes or hours longer than usual to boot completely
  • The configured DNS servers are down or inaccessible during the startup of the ESXi host
  • During the lengthy bootup process, console logins and connections with the vSphere Client or vCenter Server fail


Environment

VMware vSphere ESXi 6.5
VMware vSphere ESXi 7.0.x
VMware vSphere ESXi 6.0
VMware vSphere 6.7.x

Cause

During startup of an ESXi host, attempts are made to reach the configured DNS servers. If connection attempts to the DNS server are unsuccessful, they are retried up to a timeout period. This can manifest as a 15-30 minute delay during the startup process.

These attempts may be unsuccessful if the DNS server is within a virtual machine on the ESX/ESXi host, or if external DNS servers are unreachable from this host for any reason.

Additionally, the host will then re-try these connections to the unavailable DNS servers as it attempts to reach out to network storage based on FQDN. If a customer were to have many volumes to mount via NFS, and that NFS was configured to be reached via FQDN, requiring a DNS server, it could take hours for the ESXi host to boot.

Resolution

This is a known issue affecting all known versions of ESXi when the systems reference DNS.

Work around this issue by temporarily or permanently removing references to the unavailable DNS servers. If the host is currently stuck in the boot process, the DNS configuration can be changed using an SSH connection to the host. If the host has completed the timeout and booted successfully, the DNS configuration can be changed using the vSphere Client.

Workaround: Host is stuck in boot process

While the ESX/ESXi host is booting and has not timed out, it is unreachable from vCenter Server and the vSphere Client and it cannot accept login attempts from the physical console. You can work around this by removing the DNS server references from the command-line and then starting up again. To remove the DNS server references:

  1. Log in to the ESX/ESXi host as the root user using SSH. If you have not enabled root login on your host, see Enabling root SSH login on an ESX host (8375637).
  2. For hosts running ESXi OS before 7.0 Update 3: Open the file /etc/resolv.conf in a text editor. For more information, see Editing configuration files in VMware ESX (1017022).
  3. Make record of the current DNS server(s) in the configuration file. For example:

    nameserver 10.11.12.13
     
  4. Remove any reference to any unreachable DNS server(s).
  5. Save the configuration file.
  6. For ESXi only, make the change persistent across by reboots, using this command:

    auto-backup.sh
     
  7. Reboot the ESX/ESXi host gracefully, using this command:

    reboot

    The ESX/ESXi host starts up without delay.
     
  8. After a successful startup, use the vSphere Client to connect to the host or to vCenter Server.
  9. Select the host in the inventory.
  10. Click the Configuration tab.
  11. Select DNS and Routing under the Software section.
  12. On the right, click Properties.

    The DNS server(s) you removed from the configuration file is not present.
     
  13. Modify the DNS server addresses:
     
    • If the previously specified DNS server is now available, add it back to the configuration.
    • If the previously specified DNS server remains unavailable, add a working DNS server to the configuration.

Workaround: Host has booted successfully

No workaround is necessary once the timeout period has elapsed. However, if you expect that the DNS server might be unavailable during or or more subsequent reboots, avoid a lengthy reboot by temporarily or permanently removing the reference to the unavailable DNS server(s). To remove the DNS server references:

  1. After a successful startup, use the vSphere Client to connect to the host or to vCenter Server.
  2. Select the host in the inventory.
  3. Click the Configuration tab.
  4. Select DNS and Routing under the Software section.
  5. On the right, click Properties.
  6. Modify the DNS server addresses:
     
    • If a specified DNS server is expected to be unavailable, remove it from the configuration.
    • If a specified DNS server might be unavailable temporarily, remove it from the configuration prior to performing a reboot, and then re-add it after a successful reboot.


Additional Information

To be alerted when this document is updated, click the Subscribe to Article link in the Actions box

Editing configuration files in VMware ESXi and ESX
Enabling root SSH login on an ESX host