Redeploy an NSX Edge VM Appliance


Introduction

There are situations where you might need to redeploy an NSX Edge node. This could happen if an Edge VM becomes non-functional, or if it needs to be relocated within the datacenter—for instance, to a different datastore or compute resource. You might also redeploy to move the node to another network. Of course, the specific reasons for redeployment depend on your enviroment.

It’s important to note that redeployment applies exclusively to existing NSX Edge nodes and can only be performed with an NSX Edge VM appliance.

Prerequisites

Before redeploying an NSX Edge node, keep the following in mind:

  • While certain configurations of the NSX Edge transport node payload can be changed, do not modify the following settings on the existing NSX Edge node being replaced:

    • Failure domain
    • Transport node connectivity
    • Physical NIC configuration
    • Logical routers
    • Load balancer allocations
  • If the existing NSX Edge node is a physical server or was manually deployed via the vSphere Client, ensure that its connectivity to NSX Manager is down. If connectivity remains active, NSX will prevent the replacement of the existing node with a new one.

  • Autodeployed NSX Edge nodes will retain hardware version 13. However, starting with NSX 4.0.1.1, redeploying an NSX Edge VM automatically upgrades the new VM to a hardware version compatible with the ESXi host version. For a list of compatible VM hardware versions, refer to VMware KB article 2007240.

Procedure

To redeploy an NSX Edge node, follow these steps:

  1. Check the NSX Edge node

    • Open an SSH session and connect to the NSX Edge console.
    • Verify the logical routers configured on the NSX Edge node by running the following command in the CLI console:
      get logical-routers
      
    • Power off the NSX Edge node.
  2. Verify disconnection from NSX Manager:

    • Use the API to confirm the NSX Edge node is disconnected:

      GET /api/v1/transport-nodes/<edgenode>/state
      

      The node_deployment_state should display:

      "node_deployment_state": {
          "state": "MPA_Disconnected"
      }
      

      A state of MPA_Disconnected indicates that you can proceed with redeployment.

    • Important: If the node_deployment_state is Node Ready, NSX Manager will block the redeployment and display error 78006: Manager connectivity to Edge node must be down.

    • Alternatively, check the connectivity state from the Edge Transport Node page in the NSX UI. A disconnected NSX Edge node will show the system message:

      Configuration Error: Edge VM MPA Connectivity is down
      
  3. For an auto-deployed NSX Edge node:

    • Use the following API command to retrieve the payload of the transport node:
      GET /<NSX-Manager-IPaddress>/api/v1/transport-nodes/<edgenode>
      
    • Save the output payload for later use. (Output example)
    {
	"node_id": "607064c6-dd8d-4576-a2d9-2a73abff38aa",
	"host_switch_spec": {
		"host_switches": [
			{
				"host_switch_name": "nsxHostSwitch",
				"host_switch_id": "c8e3cfaf-9837-4ee2-8a6f-9055927e6009",
				"host_switch_type": "NVDS",
				"host_switch_mode": "STANDARD",
				"ecmp_mode": "L3",
				"host_switch_profile_ids": [
					{
						"key": "UplinkHostSwitchProfile",
						"value": "1c653cda-9c95-414f-9b97-3d8f7cb192d6"
					}
				],
				"pnics": [
					{
						"device_name": "fp-eth0",
						"uplink_name": "Uplink1"
					},
					{
						"device_name": "fp-eth1",
						"uplink_name": "Uplink2"
					}
				],
				"is_migrate_pnics": false,
				"ip_assignment_spec": {
					"ip_pool_id": "00743a1f-a1a8-46b8-96a7-e0ebe58d7feb",
					"resource_type": "StaticIpPoolSpec"
				},
				"cpu_config": [
				],
				"transport_zone_endpoints": [
					{
						"transport_zone_id": "1b3a2f36-bfd1-443e-a0f6-4de01abc963e",
						"transport_zone_profile_ids": [
							{
								"resource_type": "BfdHealthMonitoringProfile",
								"profile_id": "52035bb3-ab02-4a08-9884-18631312e50a"
							}
						]
					},
					{
						"transport_zone_id": "a95c914d-748d-497c-94ab-10d4647daeba",
						"transport_zone_profile_ids": [
							{
								"resource_type": "BfdHealthMonitoringProfile",
								"profile_id": "52035bb3-ab02-4a08-9884-18631312e50a"
							}
						]
					}
				],
				"pnics_uninstall_migration": [
				],
				"vmk_uninstall_migration": [
				],
				"not_ready": false
			}
		],
		"resource_type": "StandardHostSwitchSpec"
	},
	"maintenance_mode": "DISABLED",
	"node_deployment_info": {
		"deployment_type": "VIRTUAL_MACHINE",
		"deployment_config": {
			"vm_deployment_config": {
				"vc_id": "0adeeac2-42dc-4d5a-a4c4-1890b1174a4e",
				"compute_id": "domain-c18",
				"storage_id": "datastore-30",
				"management_network_id": "dvportgroup-29",
				"ipv4_assignment_enabled": true,
				"ipv4_assignment_disabled": false,
				"management_port_subnets": [
					{
						"ip_addresses": [
							"192.168.12.13"
						],
						"prefix_length": 24
					}
				],
				"default_gateway_addresses": [
					"192.168.12.1"
				],
				"data_network_ids": [
					"dvportgroup-1001",
					"dvportgroup-1002"
				],
				"reservation_info": {
					"memory_reservation": {
						"reservation_percentage": 100
					},
					"cpu_reservation": {
						"reservation_in_shares": "HIGH_PRIORITY",
						"reservation_in_mhz": 0
					}
				},
				"resource_allocation": {
					"cpu_count": 4,
					"memory_allocation_in_mb": 8192
				},
				"placement_type": "VsphereDeploymentConfig"
			},
			"form_factor": "MEDIUM",
			"node_user_settings": {
				"cli_username": "admin"
			}
		},
		"node_settings": {
			"hostname": "edge01-nsx.lab.home",
			"search_domains": [
				"lab.home"
			],
			"ntp_servers": [
				"192.168.12.1"
			],
			"dns_servers": [
				"192.168.11.2",
				"192.168.100.254"
			],
			"enable_ssh": true,
			"allow_ssh_root_login": true,
			"enable_upt_mode": false
		},
		"resource_type": "EdgeNode",
		"external_id": "607064c6-dd8d-4576-a2d9-2a73abff38aa",
		"ip_addresses": [
			"192.168.12.13"
		],
		"id": "607064c6-dd8d-4576-a2d9-2a73abff38aa",
		"display_name": "edge01-nsx.lab.home",
		"tags": [
		],
		"_revision": 2
	},
	"is_overridden": false,
	"failure_domain_id": "4fc1e3b0-1cd4-4339-86c8-f76baddbaafb",
	"resource_type": "TransportNode",
	"id": "607064c6-dd8d-4576-a2d9-2a73abff38aa",
	"display_name": "edge01-nsx.lab.home",
	"tags": [
	],
	"_system_owned": false,
	"_protection": "NOT_PROTECTED",
	"_create_time": 1735544264171,
	"_create_user": "admin",
	"_last_modified_time": 1735546418835,
	"_last_modified_user": "admin",
	"_revision": 2 
  }
  1. Run the redeploy API command:

Prepare the payload:

Paste the payload retrieved earlier in the body of the redeploy API. Verify the deployment_config section contains details about the target: Compute manager Datastore Network Ensure these values align with those defined in the node_settings section.

NSX Manager will use the information in the deployment_config section to redeploy the NSX Edge node to the specified location and resources.

   POST /api/v1/transport-nodes/<transport-node-id>?action=redeploy

Verifying Redeployment

After successfully executing the POST command, the revision_id will increment by one. This indicates that the command was successfully sent to the NSX Manager.

  1. Confirm the redeployment status in vCenter:

    • Log in to vCenter and navigate to the relevant cluster or host where the NSX Edge node is being redeployed.
    • Check the task and events log for deployment activity related to the NSX Edge VM.
  2. Validate the NSX Edge node redeployment:

    • Verify that the NSX Edge VM is being newly deployed in the specified location, as defined in the deployment_config section of the API payload.

Once the redeployment process is complete, ensure the NSX Edge node is functioning correctly in your NSX environment.