ESXi Hostname and DNS Settings Reset After Exiting Maintenance Mode
search cancel

ESXi Hostname and DNS Settings Reset After Exiting Maintenance Mode

book

Article ID: 448938

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When managing ESXi 8.0 or 9.0 hosts within a vCenter cluster, you observe the following:

  • Hostname and DNS details for the Default TCP/IP stack are missing or blank in the vCenter UI (Host > Configure > Networking > TCP/IP Stack).



  • Manually configured Hostname and DNS settings in the Host > Configure > Networking > TCP/IP Stack configuration are erased or reverted to blank after the host exits Maintenance Mode.

  • The output of the 'esxcfg-route -l' command executed from ESXI host CLI is as below:
    Error accessing netstack instance defaultTcpipStack, error: 2

  • SDDC Manager or vCenter tasks (such as NTP configuration or LCM updates) fail because the host cannot be reached via FQDN.

  • No host profiles or configuration profiles configured for the ESXi hosts.
  • 'esxcli system hostname get' fetches the expected hostname details.

  • Validating the details of the problematic ESXi host via mob: https://<ESXi FQDN>/mob/?moid=ha-searchindex&method=findByDnsName fetches 'void'. (Login as root user)

Environment

vCenter 9.x

ESXI host 

Cause

This issue occurs when the defaultTcpipStack is disabled within the ESXi ConfigStore. When a host exits maintenance mode, vCenter performs a host sync; however, if the netstack is inactive, the configuration data is not synchronized to the vCenter inventory, resulting in empty fields in the UI.

Resolution

To resolve this issue, you must manually enable the default netstack in the ESXi ConfigStore.

This command will make changes to your system. Review it carefully before running.

  1. Log in to the affected ESXi host via SSH as the root user.

  2. Export the current netstack configuration to a temporary JSON file: configstorecli config current get -c esx -g network -k net_stacks > /tmp/net_stacks.json
  3. Open the file /tmp/net_stacks.json using a text editor (e.g., vi) and locate the defaultTcpipStack entry.
  4. Change the "enabled": false value to "enabled": true.
  5. Save and close the file.
  6. Re-load the modified configuration back into the ConfigStore: configstorecli config current set -c esx -g network -k net_stacks -infile /tmp/net_stacks.json
  7. Restart the host management service to sync the changes to vCenter: /etc/init.d/hostd restart
  8. Verify the stack is now enabled: configstorecli config current get -c esx -g network -k net_stacks

Additional Information

Below will be the expected output when the default netstack is disabled :
[
   {
      "dns": {
         "name_server": [
            "#.#.#.#"
         ],
         "system_search_domain": []
      },
      "enabled": false ,
      "host_name": "hostname_esxi",
      "key": "defaultTcpipStack",
      "name": "defaultTcpipStack",
      "routing_config": {
         "ipv4_default_gateway": "#.#.#.#",
         "ipv4_effect_default_gateway": "#.#.#.#",
         "source": "MANUAL"
      }
   },

  • If the issue persists, verify if a Host Profile is overwriting the settings upon exiting maintenance mode.
  • For further assistance, refer to Contact Broadcom Support