VMware Cloud Foundation – Reconfigure DNS and NTP Servers using API Explorer

If you need to make changes to the DNS or NTP server information that was provided during VMware Cloud Foundation bring-up, you can use the VMware Cloud Foundation API to update the servers.

The VMware Cloud Foundation Operations and Administration Guide provides guidance around this today which can be found under the section title Updating Cloud Foundation DNS and NTP Servers, however the process documented here is based on using the curl command from the console of the SDDC Manager appliance.

Personally this method is a little more complex than simply using the Developer Center and the API Explorer that is built into the SDDC Manager UI, the main reason being that because this is using public API calls you have to authenticate and obtain an access token first and then this lengthy access token has to be included within each command for subsequent API calls.

Don’t get me wrong this method is perfectly fine, but providing a method to perform the same process right in the SDDC Manager UI where you can then also view the progress using the tasks windows just feels more user friendly.

Reconfigure DNS Server Configuration

Prerequisites

  • Verify that both forward and reverse DNS resolution is functional for each VMware Cloud Foundation component using the updated DNS server information.
  • Verify that the new DNS server is reachable from each of the VMware Cloud Foundation components.
  • Verify all VMware Cloud Foundation components are reachable from SDDC Manager.
  • Verify all VMware Cloud Foundation components are in an Active state.

Procedure

Step 1 – Create a JSON specification with the following content in a text editor.

{ 
   "dnsServers": [ 
      { "ipAddress": " IP of Primary DNS Server ", "isPrimary": true },
      { "ipAddress": " IP of Secondary DNS Server ", "isPrimary": false }
   ]
}

Step 2 – In the navigation pane, click Developer Center and then click the API Explorer tab.

Step 3 – Validate the DNS configuration JSON specification and ensure the system is healthy.

Step 3a – Expand the APIs for managing DNS & NTP configuration section, and expand POST /v1/system/dns-configuration/validations.

Step 3b – In the dnsConfiguration text box, paste the contents of the JSON specification, and click Execute.

Step 3c – In the Response section, click Validation to expand the task and copy theid.

Step 3d – Within the APIs for managing DNS & NTP configuration section, expand GET /v1/system/dns-configuration/validations.

Step 3e – In the executeStatus text box, paste the validation id, and click Execute.

Step 3f – In the Response section, click Validation, and verify that resultStatus states SUCCEEDED.

If the resultStatus says failed expand validationChecks and review which component failed.

Step 4 – Perform the DNS configuration using the validated JSON specification.

Step 4a – Expand the APIs for managing DNS & NTP configuration section, and expand PUT /v1/system/dns-configuration.

Step 4b – In the dnsConfiguration text box, paste the contents of the JSON specification, and click Execute.

Step 4b – On theAre you sure dialog, click Continue.

Reconfigure NTP Server Configuration

Prerequisites

  • Verify the new NTP server is reachable from the VMware Cloud Foundation components.
  • Verify the time skew between the new NTP servers and the VMware Cloud Foundation components is less than 5 minutes.
  • Verify all VMware Cloud Foundation components are reachable from SDDC Manager.
  • Verify all VMware Cloud Foundation components are in an Active state.

Procedure

Step 1 – Create a JSON specification with the following content in a text editor.

{ 
   "ntpServers": [ 
      { "ipAddress": " IP/FQDN of First NTP Server " }, 
      { "ipAddress": " IP/FQDN of Second NTP Server " }
   ]
}

Step 2 – In the navigation pane, click Developer Center and then click the API Explorer tab.

Step 3 – Validate the NTP configuration JSON specification and ensure the system is healthy.

Step 3a – Expand the APIs for managing DNS & NTP configuration section, and expand POST /v1/system/ntp-configuration/validations.

Step 3b – In the ntpConfiguration text box, paste the contents of the JSON specification, and click Execute.

Step 3c – In the Response section, click Validation to expand the task and copy theid.

Step 3d – Within the APIs for managing DNS & NTP configuration section, expand GET /v1/system/ntp-configuration/validations.

Step 3e – In the executeStatus text box, paste the validation id, and click Execute.

Step 3f – In the Response section, click Validation, and verify that resultStatus states SUCCEEDED.

If the resultStatus says failed expand validationChecks and review which component failed.

Step 4 – Perform the NTP configuration using the validated JSON specification.

Step 4a – Expand the APIs for managing DNS & NTP configuration section, and expand PUT /v1/system/ntp-configuration.

Step 4b – In the ntpConfiguration text box, paste the contents of the JSON specification, and click Execute.

Step 4c – On theAre you sure dialog, click Continue.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s