Update DNS Server IP address for vCenter Server Appliance
search cancel

Update DNS Server IP address for vCenter Server Appliance

book

Article ID: 375247

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

Steps to modify the DNS settings for the vCenter Server to use a different DNS server IP address.

Environment

  • VMware vCenter Server

Resolution

Prerequisites prior to changing the DNS IP for vCenter server.

  1. Verify that the user logging in to the vCenter Server instance within the vCenter Server Appliance is a member of the SystemConfiguration.Administrators or Administrators group in vCenter Single Sign-On.
  2. Verify that the new DNS server has the correct host records (A Record and PTR records) for the vCenter Server.
  3. Ensure the new DNS server has records for all ESXi hosts connected to this vCenter Server.
  4. It is highly recommended to take a file-based vCenter Server backup or an offline snapshot. (Refer to Snapshot Best practices for vCenter Server Virtual Machines).

Changing the DNS server using the VCSA VAMI

  1. Log in to the vCenter Server Management Interface (VAMI) as the root user.
    https://<vCenter_IP/FQDN>:5480

  2. On the left-hand panel, navigate to the Networking section.
  3. In the Network Settings view, click EDIT in the top right corner.
  4. In the Select Network Adapter section, select the NIC to modify and click NEXT.
  5. In the Edit settings section, expand the Hostname and DNS field, make the appropriate changes, and click NEXT.
  6. In the SSO credentials section, enter the appropriate credentials (e.g., [email protected]).
  7. In the Ready to complete section, review the settings and accept the acknowledgment:
    "I acknowledge that I have made a backup of my vCenter Server and unregistered extensions before continuing with my network configuration".

  8. Click FINISH.

A window will appear displaying "Network update in progress: Modifying Network Configuration".

Upon completion, the window will state "Network update succeeded: Process Completed".

Note: The following post-configuration steps apply only when making significant modifications, such as changing the vCenter Server hostname or IP address. They are not required for this procedure, as only the DNS server IP address is being updated.

  1. All deployed plug-ins must be re-registered.
  2. All custom certificates must be regenerated.
  3. vCenter HA must be reconfigured.
  4. Hybrid Linked Mode with Cloud vCenter Server must be recreated.
  5. The appliance must be rejoined to Active Directory.

Additional Information

The vCenter Server services might not start after changing the DNS servers, displaying a "No healthy upstream" error message when connecting via a web browser.

Another possible error message is: "Service did not set the task state".

If the vCenter Server Appliance uses an IP address as its hostname, the following error might appear: "Specified hostname is invalid".

If you are unable to update the DNS configuration via the VAMI, it can be changed using the command-line interface.


Changing the DNS servers using DCLI:

  1. Open a console to the VCSA and log in as the root user.
  2. If the appliance shell is the active default shell, proceed to step 4; otherwise, proceed to step 3.
  3. If the BASH shell is the active default shell, access the appliance shell by entering: appliancesh
  4. Run the following command to retrieve the current DNS configuration:

    dcli com vmware appliance networking dns servers get

    (Note: The [email protected] credentials are required when the command prompts for a username and password.)

  5. Run the following command to set the DNS servers:

    dcli com vmware appliance networking dns servers set --mode is_static --servers #.#.#.# --servers #.#.#.#

    (Note: To add multiple entries, the --servers flag must be appended multiple times. Rerunning the command overwrites existing values.)


Legacy Solution:

Changing the DNS server using the VAMI_CONFIG_NET 

  1. Open a console session to the VCSA and log in as the root user.

  2. Run the following command:

    /opt/vmware/share/vami/vami_config_net

    Command output:

    Main Menu
    0) Show Current Configuration (scroll with Shift-PgUp/PgDown)
    1) Exit this program
    2) Default Gateway
    3) Hostname
    4) DNS
    5) Proxy Server
    6) IP Address Allocation for eth0

  3. Enter option 4 to update the DNS entries.