NSX-T NVDS migration pre-check by cluster
search cancel

NSX-T NVDS migration pre-check by cluster

book

Article ID: 380715

calendar_today

Updated On:

Products

VMware NSX-T Data Center

Issue/Introduction

These API calls will allow the user to individually migrate clusters from NVDS to VDS by cluster instead of the entire environment at once.

Environment

VMware NSX-T Data Center

VMware NSX

Resolution

  1. Pull all NSX-T Host Cluster IDs from GET API call:
    1. GET https://<nsx-manager-ip>/policy/api/v1/infra/sites/<site-id>/enforcement-points/<enforcementpoint-id>/transport-node-collections
    2. If the Above API failed to display the node collection, Run below API and save the information on a notepad.
      1. GET https://<NSX-Manager-IP/FQDN>/api/v1/fabric/compute-collections
  2. Below steps to be performed per cluster basis.
  3. Record the output so you can select which clusters you want to migrate. Note compute collection ID.
    1. Example: "compute_collection_id": "####-####-####-####-####:domain-####" , Cluster name: <Cluster Name>
  4. Generate pre check ID on the selected cluster, For cluster ID use the compute_collection_id from above API output.
    1. POST https://<nsx-manager-ip>/api/v1/nvds-urt/precheck-by-cluster/<cluster_id>
      1. Record the precheck id from the output.
  5. Validate the topology status-summary by running below API call(Status will be displayed as PENDING_TOPOLOGY).
    1. GET https://<nsx-manager-ip>/api/v1/nvds-urt/status-summary/<precheck-id>
  6. Prechecks generates the topology, The way to validate is through below API.

    1. GET  https://<NSX-Manager-IP>/api/v1/nvds-urt/topology/<precheck-ID>
      
      Out Put Reference:
      {
          "topology": [
              {
                  "nvds_id": "<NVDS ID>",
                  "nvds_name": "<NVDS Name>",
                  "compute_manager_topology": [
                      {
                          "compute_manager_id": "########-####-####-####-############",
                          "dvswitch": [
                              {
                                  "data_center_id": "<DataCenter-ID>",
                                  "cluster_id": "########-####-####-####-############:domain-c#######",
                                  "vds_name": "CVDS-######-####-###-datacenter-#####-#########",
                                  "vmknic": [],
                                  "transport_node_id": [
                                      "<TN 1-UUID>",
                                      "<TN 2-UUID>",
                                      "<TN 3-UUID>"
                                  ],
                                  "id": "#####-####-####-####-###########",
                                  "_protection": "NOT_PROTECTED"
                              }
                          ]
                      }
                  ],
                  "id": "#####-####-####-####-##########",
                  "_protection": "NOT_PROTECTED"
              }
          ]
      }
      1. Copy the above Output, Go to Body--> Click on raw--> select json.
        1. Paste the output copied, and run the following API call.
        2. POST https://<NSX-Manager-IP/FQDN>/api/v1/nvds-urt/topology?action=apply
      2. To verify the topology applied to the cluster and hosts.
        1. GET https://<NSX-Manager-IP/FQDN>/api/v1/nvds-urt/status-summary/<precheck-ID>
          
          Out Put Reference:
          {
              "precheck_id": "<Precheck-ID>",
              "precheck_status": "READY",
              "migration_state": [
                  {
                      "host": "<TN 1-UUID>",
                      "overall_state": "UPGRADE_READY",
                      "ip_address": "<TN IP address>",
                      "_protection": "NOT_PROTECTED"
                  },
                  {
                      "host": "<TN 2-UUID>",
                      "overall_state": "UPGRADE_READY",
                      "ip_address": "<TN IP address>",
                      "_protection": "NOT_PROTECTED"
                  },
                  {
                      "host": "<TN 3-UUID>",
                      "overall_state": "UPGRADE_READY",
                      "ip_address": "<TN IP address>",
                      "_protection": "NOT_PROTECTED"
                  }
              ]
          }
  7. Below steps to be repeated for all the hosts one by one with maintenance mode of Host.
    1. Keep the first host(TN) in maintenance mode by collecting below information.
    2. Host "<ESXi Host name>" with Management IP: <host management IP/ TN IP address> , Hence picking TN ID for the same Host which is maintenance mode-->  <TN UUID>
    3. Run below API call to NVDS to VDS per host
      1.  Post https://<NSX -Manager-IP/FQDN>/api/v1/transport-nodes/<TN ID>?action=migrate_to_vds
    4. Validate the status through GET API.
      1.  https://<NSX-Manager-IP>/api/v1/nvds-urt/status-summary/Precheck-ID
        
        Output: (UPGRADE_IN_PROGRESS)
        -----------------------------------------
        {
            "precheck_id": "<Precheck-ID>",
            "precheck_status": "READY",
            "migration_state": [
                {
                    "host": "<TN 1 -UUID>",
                    "overall_state": "UPGRADE_READY",
                    "ip_address": "<TN IP>",
                    "_protection": "NOT_PROTECTED"
                },
                {
                    "host": "<TN 2 -UUID>",
                    "overall_state": "UPGRADE_IN_PROGRESS",
                    "ip_address": "<TN IP>",
                    "upgrade_stage": "TN_RECONFIG_HOST",
                    "_protection": "NOT_PROTECTED"
                },
                {
                    "host": "<TN 3 -UUID>",
                    "overall_state": "UPGRADE_READY",
                    "ip_address": "<TN IP>",
                    "_protection": "NOT_PROTECTED"
                }
            ]
        }
        
        Same API call Output 2 upon completion: (SUCCESS)
        -----------------------------------------
        {
            "precheck_id": "<Precheck-ID>",
            "precheck_status": "READY",
            "migration_state": [
                {
                    "host": "<TN 1 -UUID>",
                    "overall_state": "UPGRADE_READY",
                    "ip_address": "<TN IP>",
                    "_protection": "NOT_PROTECTED"
                },
                {
                    "host": "<TN 2 -UUID>",
                    "overall_state": "SUCCESS",
                    "ip_address": "<TN IP>",
                    "upgrade_stage": "TN_MIGRATION_COMPLETED",
                    "_protection": "NOT_PROTECTED"
                },
                {
                    "host": "<TN 3 -UUID>",
                    "overall_state": "UPGRADE_READY",
                    "ip_address": "<TN IP>",
                    "_protection": "NOT_PROTECTED"
                }
            ]
        }
    5. First node migration went success , Validate CVDS information from the ESXi host i.e host transport node.
    6. Exit the host maintenance and repeat step number 3 for other pending nodes within the cluster.