Unable to update DNS or DHCP configurations on existing NSX VPC Subnets via API
search cancel

Unable to update DNS or DHCP configurations on existing NSX VPC Subnets via API

book

Article ID: 438426

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • When using the PatchVpcSubnet API to update the dhcp_config (such as DNS server IPs) of an existing VPC subnet, the API call may return a success status.
  • Newly provisioned Virtual Machines (VMs) on these modified subnets continue to receive the old DNS/DHCP configuration.
  • This behaviour is observed only on older/existing subnets
  • Newly created subnets correctly apply the DNS configuration defined at the time of creation.

Environment

 NSX 4.x

Cause

  • Updating the DHCP or DNS configuration of an existing VPC subnet is not a supported workflow in VMware NSX 4.x.
  • The current architectural design for VPC subnets in the 4.x branch does not push DHCP/DNS updates to the realization layer for subnets that have already been provisioned.

Resolution

To implement a change to the DNS or DHCP settings for a VPC subnet, the subnet must be recreated:

  1. Identify the current configuration of the subnet using a GET API call.
  2. Backup any specific metadata or tags associated with the subnet.
  3. Delete the existing VPC subnet (ensure all connected VMs are disconnected or moved first).
  4. Recreate the subnet using the POST or PATCH API, including the new DNS/DHCP parameters in the initial request body.

Note: This limitation is specific to the 4.x release branch and has been addressed in the new VPC design on latter releases, a validation error will be added to the API to inform users that this operation is not supported.

Additional Information

Create or update VPC Subnet
VPC subnets configured with external DHCP relay incorrectly provision an NSX DHCP server, causing VMs to receive IP addresses from the wrong DHCP source.