Update DNS Server IP address for vCenter Server
search cancel

Update DNS Server IP address for vCenter Server

book

Article ID: 375247

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

When administrators want to edit the DNS settings and select which DNS server to use for vCenter server.

Environment

Prerequisites prior to changing the DNS IP for vCenter server.

  • Verify that the user who logs in to the vCenter Server instance in the vCenter Server Appliance is a member of the SystemConfiguration or Administrators group in vCenter Single Sign-On.
  • Verify that the new DNS server has the correct host records (A Record and PTR records) for the vCenter.
  • Also ensure the new DNS Server has records for all the ESXi Hosts connected to this vCenter.
  • It is recommended to have a vCenter Backup or a snapshot. - Snapshot Best practices for vCenter Server Virtual Machines

Resolution

Changing the DNS server using the VCSA VAMI

  1. Login into the vCenter's VAMI page via root

    https://<vCenter_IP/FQDN>:5480

  2. On the left hand side panel, navigate to the Networking section.

  3. In the Network Settings view, click on EDIT in the top right corner.

  4. On the 'Select Network Adapter' section, select the NIC to make changes to and click NEXT.

  5. On the 'Edit settings' section, expand the "Hostname and DNS" field and make the appropriate changes and click NEXT.

  6. On the SSO credentials section, enter in the appropriate credentials e.g.: [email protected]

  7. On 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"

    Next Steps
    After network settings have been reconfigured and your vCenter Server Appliance is up and running, additional actions will be required.

    All deployed plug-ins will need to be re-registered.

    All custom certificates will need to be regenerated.

    vCenter HA will need to be reconfigured.

    Hybrid Link with Cloud vCenter server has to be recreated.

    Active Directory will need to be rejoined.

    Note: The Next Steps are applicable only if you are making significant changes like Hostname and vCenter IP Address change. They are not applicable in this case because we are changing only the DNS Server IP Address/es

  8. Click FINISH

  9. A window will appear with "Network update in progress" "Modifying Network Configuration.



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

Additional Information

Sometimes, the vCenter will not start after changing DNS servers and encounter an error message No healthy upstream when connecting with a browser.

Another error message may appear as: "Service did not set the task state

If the vCenter Appliance is using an IP address as the hostname, an error may appear as: "Specified hostname is invalid"

If you are unable to update the DNS configuration via the VAMI, it can be changed via command line. See below:

Current Solution:

Changing the DNS server using DCLI:

  1. Open a console to the VCSA, then login with root
  2. If the appliance shell is active and default then continue to Step 4, otherwise move to Step 3
  3. If bash shell is the active and default, access the appliance shell by entering: appliancesh 
  4. Run the below command to get the current DNS configuration:

    dcli com vmware appliance networking dns servers get

    (Note: The [email protected] credentials will be required when the command prompts for username and password)

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

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

    (Note: To enter multiple entries, the --server flag must be attached multiple times. Running the command again will just overwrite the existing values)


Legacy Solution:

Changing the DNS server using the VAMI_CONFIG_NET 

  1. Open a console session of the VCSA, then login with root.

  2. Run the following command:

    /opt/vmware/share/vami/vami_config_net

    (Command output below.)

    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