Multi Cluster NSX-T NVDS to VDS Migration

With the release of the converged VDS (CVDS) in ESXi 7 NSX-T users are able to convert back to a vCenter managed VDS. This helps in reducing management overhead for the environment and you can read all about it elsewhere. For people who have a multi transport VLAN confguration on your N-VDS the regular migration path doesn’t work. Normally you would just follow the procedure out lined in the docs and off the migration would go. If you’ve tried to use this and got an error similar to this:

{
  "precheck_id": "AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA",
  "precheck_status": "FAILED",
  "precheck_issue": [
    {
      "component": "Uplink profile",
      "objid": "overlay-and-vlan-nvds",
      "error": "Found inconsistent profiles: [XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXXX, YYYYYYYY-YYYY-YYYY-YYYY-YYYYYYYYYYYY]. Uplink profile mismatch. TransportVlan mismatch. ",
      "recommendation": "Keep profiles consistent among transport nodes in the same NVDS",
      "_protection": "NOT_PROTECTED"
    }
  ]
}

Then you need to use the precheck_by_cluster. This is not available from the CLI (at least not that I can find). There are a few steps to doing this via the API. The first is to do a precheck by clusters. The URI is:

POST https://<nsx-mgr>/api/v1/nvds-urt/precheck-by-clusters

The body should include the cluster IDs prepended buy the compute manage GUID:

{
    "cluster_ids" : "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX:domain-cXXX"
}

The compute manager GUID can be found via

GET https://<nsx-mgr>/api/v1/fabric/compute-managers

The cluster ID is from vCenter. The easiest way to find that is to login to vCenter and select your cluster in the Host And Clusters view. The URI will have the cluster ID in it.

ui/app/cluster;nav=h/urn:vmomi:ClusterComputeResource:domain-c8:86b3a9a5-4b21-43f4-93ed-34363d380524/updates

For my environment it is domain-c8. Once This is run the return will be a precheck_id and status. The status should be “PENDING_TOPOLOGY”.

{
   "precheck_id": "45dbd980-66f1-4a77-a306-2d417531dea1",
   "precheck_status": "PENDING_TOPOLOGY"
}

To view the recommended topology for migration call this URI

GET https://<nsx-mgr>/api/v1/nvds-urt/topology/<precheck_id>?cluster_id=<clusterid>

The precheck_id comes from the return on the previous request and the cluster id is the compute manager GUID and vCenter cluster ID from the previous request. The response will include a lot of data. It should look something like this

{
   "topology":[
      {
         "nvds_id":"AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAA",
         "nvds_name":"NVDS Switch Name",
         "compute_manager_topology":[
            {
               "compute_manager_id":"BBBBBBBB-BBBB-BBBB-BBBB-BBBBBBBBBBB",
               "dvswitch":[
                  {
                     "data_center_id":"datacenter-C",
                     "cluster_id":"DDDDDDDD-DDDD-DDDD-DDDD-DDDDDDDDDDD",
                     "vds_name":"<new-VDS-name>",
                     "vmknic":[
                        
                     ],
                     "transport_node_id":[
                        "EEEEEEEE-EEEE-EEEE-EEEE-EEEEEEEEEEE",
                        "FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFF"
                     ],
                     "id":"GGGGGGGG-GGGG-GGGG--GGGG-GGGGGGGGGGG",
                     "_protection":"NOT_PROTECTED"
                  }
               ]
            }
         ]
      }
   }

All of these values will be populated. The “vds_name” value should be changed to what the new CVDS will be called. By taking this response and putting it into the body of a new request to

PUT https://<nsx-mgr>/api/v1/nvds-urt/topology?action=apply&cluster_id=<clusterid>

This will apply the topology to the specific cluster. The call will create a CVDS in vCenter. Now each of the transport nodes must be migrated to the CVDS. Each host must be put in maintenance mode before the migration. To match the host name to the transport_node_id use NSX Manager. Navigate to “System->Fabric->Nodes.” Select the correct compute manager and then select the host that was put into maintenance mode:

Transport Node ID

After the host is in maintenance mode call the migrate_to_vds API:

POST https://<nsx-mgr>/api/v1/transport-nodes/<transport_node_id>/?action=migrate_to_vds

This will migrate the host from the N-VDS to the CVDS. There should be no response. To check the status of the migration call:

GET https://<nsx-mgr>/api/v1/nvds-urt/status-summary/<precheck_ID>?cluster_id=<cluster_id>

This will return the status of the migration. Wait until upgrade_state of the transport node reads “SUCCESS”

{
  "precheck_id": "a39209a5-6e46-4b08-b9eb-b5a33b83fcce",
  "precheck_status": "READY",
  "migration_state": [
    {
      "host": "29451c16-25bf-4a3d-80e2-34db87d94f79",
      "overall_state": "UPGRADE_IN_PROGRESS",
      "upgrade_stage": "TNP_WAIT"
    },
    {
      "host": "d9b8a91d-190f-4a70-a277-6642172ef53c",
      "overall_state": "SUCCESS",
      "upgrade_stage": "TN_MIGRATION_COMPLETED"
    }
  ]
}

Once completed for this transport node take the host out of maintenance mode and test the connectivity of a VM on the host. Continue with the maintenance mode, migrate_to_vds, exit maintenance mode, and test until all hosts in the cluster are migrated. Once all are completed clean up the upgrade via:

POST https://<nsx-mgr>/api/v1/nvds-urt?action=cleanup

This will not cleanup the old NVDS objects or transport node profiles. These will need to be removed manually once all of the migrations are completed.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: