Post

Redeploy an NSX Edge Transport Node using the API

RLearn how to redeploy an NSX Edge Transport Node using the NSX Manager API.

Redeploy an NSX Edge Transport Node using the API

In this post, we will redeploy the NSX Edge Transport Node using the NSX Manager API call where you can easily and quickly redeploy your edge node. I am in a situation, where my nodes are not responding as I am constantly testing things in my Lab, so I wanted to share how you can do that in your production environment.

Version note: This procedure was tested with the NSX version available when this article was written. API payload requirements and UI names may vary between NSX-T and NSX releases. Test the procedure in a lab before using it in production.

There are several reasons to redeploy an NSX Edge Transport Node:

  • Recovering an Edge VM that is no longer responding.
  • Replacing or rebuilding an Edge VM.
  • Changing the management network or other network placement details.
  • Moving the Edge VM to another compute resource or datastore.
  • Changing the virtual hardware configuration.
  • Applying changes that require the Edge appliance to be redeployed.

Scope: This procedure applies to NSX Edge VM appliances. Physical Edge node replacement follows a different workflow and should not be performed with this procedure.

Prerequisites

Before starting:

  • Confirm the correct NSX Manager FQDN or IP address.
  • Confirm the Edge Transport Node ID.
  • Verify that you have NSX Manager administrator privileges.
  • Confirm that the target Edge node is an Edge VM.
  • Back up or save the original JSON response.
  • Confirm that the required compute manager, datastore, network, and resource details are still valid.
  • Ensure that the Edge node is not actively carrying traffic that cannot be interrupted.
  • Schedule a maintenance window if the Edge provides production services.
  • Use an API client such as Postman or curl.
  • Confirm that you can monitor the Edge node from NSX Manager and vCenter during the operation.

Warning: Redeploying an Edge Transport Node can interrupt network services that depend on the node, including north-south routing, NAT, VPN, load balancing, and other Edge services. Verify the impact and perform the operation during an approved maintenance window.

Step 1: Retrieve the Transport Node ID

First, retrieve the list of transport nodes from NSX Manager:

1
GET [https://nsx.mkv.lab/api/v1/transport-nodes/](https://nsx.mkv.lab/api/v1/transport-nodes/)

Identify the Edge Transport Node that you want to redeploy and copy its UUID.

In this example, the transport node ID is:

1
fd57b46c-70a2-4382-8d89-8e6544a165b9

You can also retrieve the ID from the NSX Manager user interface under:

1
System > Fabric > Nodes > Edge Transport Nodes

Step 2 – Change the JSON Config
Now we need to update some information in the configuration. I start by copying the entire JSON file to my preferred editor, where I review everything and make any necessary changes. In this case, I’m satisfied with the current settings, so I only need to add the password section to the configuration. I just added the passwords as follows under “node_user_settings”

1
2
3
4
5
6
7
"node_user_settings": {
    "cli_username": "admin",
    "audit_username": "audit",
    "cli_password": "YOUR_PASSWORD",
    "audit_password": "YOUR_PASSWORD",
    "root_password": "YOUR_PASSWORD"
   } 

Step 3: Redeploy the Edge Transport Node

In Postman, create a new request with the following settings:

  • Method: POST
  • URL: https://nsx.mkv.lab/api/v1/transport-nodes/fd57b46c-70a2-4382-8d89-8e6544a165b9?action=redeploy
  • Authentication: NSX Manager administrator credentials.
  • Body: raw
  • Format: JSON
  • Content: The complete, reviewed JSON payload retrieved in the previous step.

The request URL is:

1
POST [https://nsx.mkv.lab/api/v1/transport-nodes/fd57b46c-70a2-4382-8d89-8e6544a165b9?action=redeploy](https://nsx.mkv.lab/api/v1/transport-nodes/fd57b46c-70a2-4382-8d89-8e6544a165b9?action=redeploy)

Do not send only the node_user_settings object. The request body must contain the complete configuration payload returned by the GET request, including the required deployment and node settings.

Step 4: Monitor the Redeployment

After submitting the request:

  1. Monitor the response in Postman.
  2. Open NSX Manager.
  3. Navigate to System > Fabric > Nodes > Edge Transport Nodes.
  4. Monitor the Edge Transport Node configuration status.
  5. Check vCenter Tasks and Recent Tasks for deployment activity.
  6. Confirm that the Edge VM is present in the expected compute and datastore location.
  7. Verify that the Edge node becomes healthy.
  8. Confirm that the expected interfaces, uplinks, transport zones, and services are available.
  9. Test the network services that depend on the Edge node.

The redeployment may take several minutes. Do not assume success only because the API request was accepted. Confirm that the node reaches a successful and healthy state. If you go back to NSX Manager you will see that the edge node will be redeployed.

This post is licensed under CC BY 4.0 by the author.