Update DNS in VMware Cloud Foundation 4.x after Bring Up
search cancel

Update DNS in VMware Cloud Foundation 4.x after Bring Up

book

Article ID: 305985

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

This KB article provides manual steps to update DNS servers manually in each component in VCF stack

Symptoms:

Unable to update DNS in VCF environment by following the document below

Update DNS Server Configuration (4.x)

Update DNS Server Configuration (5.x)

Environment

VMware Cloud Foundation 4.x
VMware Cloud Foundation 5.x

Resolution

Workaround:
 
Execute the steps in below order:
1. VC
2. ESXi
3. NSX-T
4. VRSLCM
5. SDDC Manager

Manual DNS configuration on SDDC components:

Configure DNS on vCenter:
-------------------------
1. Login to <VC_IP>:5480 -> Networking -> Edit -> <Update new DNS servers> --> Save

Configure DNS on ESXi servers:
-----
1. via vCenter UI : Login to <VC_IP> -> Select each host -> Configure -> TCP/IP configuration --> Default --> <Update new DNS servers> --> Save
 
OR
 
2. via ESXi web UI : Login to <ESXI IP> -> Networking --> TCP/IP stacks -> Default TCP/IP stacks -> Edit -> <Update new DNS servers> --> Save


Configure DNS on NSX-T managers:

1. From SDDC Manager execute get the current confifuration: (change the hostname/ip and username/basic auth password accordingly)
 curl -u 'admin:<Password>' <https://examplensxmanager/api/v1/node/network/name-servers -k>

2. Update the configuration

curl -u 'admin:<Password>' -X PUT -H 'Content-type: application/json' <https://examplensxmanager/api/v1/node/network/name-servers -d> '{"name_servers":["#.#.#.#","#.#.#.#"]}' -k

3. Verify the changes:
curl -u 'admin:<Password>' <https://examplensxmanager/api/v1/node/network/name-servers -k>

Configure DNS on SDDC Manager:

1. Get the current configuration
$ curl localhost/inventory/system-info
{"dnsInfo":{"rootDomain":"vsphere.local","subDomain":"vrack.vsphere.local","primaryDns":"#.#.#.#"},"ntpInfo":{"ntps":["#.#.#.#"]}}

2. Update the configuration
----------------------------
$ curl -H "Content-Type: application/json" -X PATCH <http://localhost/appliancemanager/dns/configuration> -d '{"primaryDnsServer": "#.#.#.#", "secondaryDnsServer": "#.#.#.#"}'

3. Verify the updated configuration:
----------------------------
$ curl localhost/inventory/system-info
{"dnsInfo":{"rootDomain":"vsphere.local","subDomain":"vrack.vsphere.local","primaryDns":"#.#.#.#","secondaryDns":"#.#.#.#"},"ntpInfo":{"ntps":["#.#.#.#"]}}


Additional Information

Impact/Risks:

Name resolutions will fail if ping and nslookup is not verified before performing these steps

1.Ping DNS Servers directly from each component and make sure they are pingable 
2.Run the following command to verify DNS resolution works with new DNS servers before executing this KB article

nslookup ip_of_SDDC ip_of_new_DNS
nslookup FQDN_of_SDDC ip_of_new_DNS

DO NOT PERFORM THESE STEPS IF DNS RESOLUTION FAILS!