The GET API https://<NSX Manager IP>/policy/api/v1/orgs/default/projects/<project_name>/vpcs/<vpc_name>/subnets/<subnet_id>
shows the response includes access_mode set to Public and a DHCP configuration with enabled set to true.
{ "ipv4_subnet_size": 16, "access_mode": "Public", "dhcp_config": { "enable_dhcp": true }, "resource_type": "VpcSubnet", "id": "<subnet_id>", "display_name": "<display name for the subnet id>",}VMware NSX
During the VPC subnet creation, the relay profile path fails to get correctly copied to the VPC subnet due to a known issue with version 4.2.x prior to 4.2.3.3
This is a known issue and has been resolved in NSX 4.2.3.3.
Workaround:
1. Run the following GET API to retrieve the current subnet configuration:
GET: https://<nsx_manager_fqdn>/policy/api/v1/orgs/default/projects/<project_name>/vpcs/<vpc_name>/subnets/<subnet_name>
Example response snippet:
{
"ipv4_subnet_size": 16,
"access_mode": "Public",
"dhcp_config": {
"enable_dhcp": true
},
"resource_type": "VpcSubnet",
"id": "<subnet_id>",
"display_name": "<display name for the subnet id>",
}
2. Detach any VMs connected to the subnet.
3. Delete the existing subnet.
4. Recreate the subnet using the PATCH API call below, ensuring that the DHCP relay configuration path is included in the request body.
PATCH: https://<NSX Manager IP>/policy/api/v1/orgs/default/projects/<project_name>/vpcs/<vpc_name>/subnets/<subnet_id>
{
"ipv4_subnet_size": 64,
"access_mode": "Public",
"dhcp_config": {
"enable_dhcp": true,
"dhcp_relay_config_path": "/orgs/default/projects/<project_name>/infra/dhcp-relay-configs/<name_of_dhcp_relay_config>"
}
}