NSX-T makes it very easy to deploy virtual edge transport nodes using the NSX manager. Simply fill in a couple of variables and it will make sure a new node is created by importing an OVF file on your vSphere environment. But once deployed not all settings can be changed. This is where the NSX manager API can be a useful tool.
There are several reasons why you would want to change an edge node.
- You might want to change the management portgroup (management_network_id).
- You want to change certain advanced settings (KB 91039).
- You want your edge node to have a more recent virtual hardware version (KB 90216).
Either way, you can go about this using the NSX manager UI just like my good pal Ruurd Bakker described in this blog post: Resize a NSX-T EdgeVM – (vronin.nl). If you are comfortable using REST APIs you will find that using the NSX manager API is even easier. There is one caveat which is quite obvious, which is that the edge node is an is an auto-deployed node.
The first thing you need is the edge node ID which can be collected using the NSX Manager UI, or you can use the API by calling this URL and grabbing the node_id.
GET /<NSX-Manager-IPaddress>/api/v1/transport-nodes
Next use the node_id in the next API call to retrieve the edge node config.
GET /<NSX-Manager-IPaddress>/api/v1/transport-nodes/<transport-node-id>
Copy the complete JSON object which is returned by the previous API call and use it as the body for the next one. If you are using Postman configure the body as raw and JSON as the format type. Next use a POST request to start the redeploy using this URL.
POST https://<manager-ip>/api/v1/transport-nodes/<transport-node-id>?action=redeploy
The POST request should return a JSON object with the desired configuration. You can then go to the NSX manager UI to follow the progress.
0 Comments