VMware Networking Community
dgoldsmith
Enthusiast
Enthusiast

Changing NSX Edge Description and Tenant Field Values

Is it possible to change the description or Tenant of an NSX Edge after its initial deployment?

The web GUI (NSX 6.4.0 and vSphere 6.5 U2) does not appear to support it.  I have not been able to find any references in the CLI documentation for changing these fields either.  is there a way or do we need to destroy and recreate the Edges (if important enough to us) or just leave the current values as is?

Thanks,

David

0 Kudos
2 Replies
mdac
Enthusiast
Enthusiast

Hi David,

Unfortunately, these can't be changed after the fact in the UI, but it's fairly straight-forward to update these fields via API call. First, you'd need to retrieve all of the XML configuration of the edge by using the following API call:

GET https://<nsxmgrip>/api/4.0/edges/edge-X

Then you'd copy and paste the XML response with all the existing configuration and modify the specific sections you want to update. For example, here is where you'd change the tenant:

<edge>

    <id>edge-4</id>

    <version>32</version>

    <status>deployed</status>

    <datacenterMoid>datacenter-2</datacenterMoid>

    <datacenterName>Toronto</datacenterName>

    <tenant>test</tenant> <------change here

...

Then, after making the required changes, you'd paste it back into the body of a new PUT call targeting the same ESG:

PUT https://<nsxmgrip>/api/4.0/edges/edge-X

You can find more information on the required API calls on page 334 of the NSX API guide:

https://docs.vmware.com/en/VMware-NSX-Data-Center-for-vSphere/6.4/nsx_64_api.pdf

I'll work on creating a blog post for this as well for some more detailed instructions.

Thanks,

Mike

My blog: https://vswitchzero.com Follow me on Twitter: @vswitchzero
0 Kudos
chrisgnoon
Enthusiast
Enthusiast

I'm having a similar issue but with the Edge description.

GET https://x.x.x.x/api/4.0/edges/edge-8

Get the response.

Added the line: <description>Edge Description</description> under the version section.

PUT the body back to https://x.x.x.x/api/4.0/edges/edge-8

204 responce and no description update.

Chris Noon | CCDP | CCNP | VCDX 289
Don't forget to mark as solved if your questions are answered.
0 Kudos