DNS Server IP change on ESXi host:
Method 1: Using vSphere Client (UI)
If the host is managed by vCenter and reachable, you can update DNS settings directly from the UI.
- Log in to the vSphere Client.
- Navigate to:
Hosts and Clusters → Select the ESXi Host
- Go to the Configure tab.
- Under Networking, select TCP/IP configuration.
- Choose the appropriate TCP/IP stack (usually Default TCP/IP Stack).
- Click Edit settings.
- Under DNS Configuration, update the Primary and Alternate DNS servers.
- Click OK to save the configuration.
- Reconnect the host or restart management services if required for the changes to take effect.
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Method 2: Using Direct Console User Interface (DCUI)
This method is useful when the host is not reachable on the network or SSH is disabled.
- Log in to the ESXi Direct Console User Interface (DCUI).
- Press F2 on the host console to access Customize System/View Logs.
- Enter the root credentials.
- Navigate to:
Configure Management Network → DNS Configuration
- Enter the new Primary and Alternate DNS Server IP addresses.
- Press Enter to save.
- Select Restart Management Network to apply the changes.
- Verify the updated DNS configuration under:
Configure Management Network → Network Adapters or DNS Configuration
--------------------------------------------------------------------------------------------------------------------------------------------------------------
Method 3: Using ESXi Shell / SSH
- Log in to the ESXi host via SSH or ESXi Shell.
- View the current DNS configuration:
esxcli network ip dns server list
- Add a new DNS server IP:
esxcli network ip dns server add -s <DNS_IP_Address>
- Remove an existing DNS server IP:
esxcli network ip dns server remove -s <DNS_IP_Address>
- Restart the management services to apply the change:
/etc/init.d/hostd restart && /etc/init.d/vpxa restart
Note:
If the ESXi host is part of a vSphere Distributed Switch (vDS), it may need to be re-added to the distributed switch after the management network reconfiguration.