NSX-T upgrade pre-check warning "Group #### contains upgrade units, so cannot be deleted."
search cancel

NSX-T upgrade pre-check warning "Group #### contains upgrade units, so cannot be deleted."

book

Article ID: 415340

calendar_today

Updated On:

Products

VMware NSX

Issue/Introduction

  • NSX Upgrade for Hosts displays the following "Hosts upgrade has failed. check error details to determine if manual resolution is needed and Retry Upgrade".

  • NSX Upgrade for Hosts displays the following  "Group #### contains upgrade units, so cannot be deleted."



  • Error details shows this host as POWERED_OFF. This occurred because the host had already been decommissioned directly from vCenter.




  • The NSX upgrade pre-checks were completed when the decommissioned host was still part of the vCenter inventory. However, the host was later removed directly from vCenter.
  • In the NSX UI, we cannot find the impacted Host on the following pages:

     System > Fabric > Hosts > Cluster
     System > Fabric > Hosts > Other hosts
     System > Fabric > Hosts > Standalone

Environment

VMware NSX

Cause

When an ESXi host is removed directly from vCenter without first uninstalling NSX, remnants of that host may remain in the NSX database.

Resolution

Follow API method to remove the stale host from NSX.

  1. Run the following API call using Postman or any other REST API tools to find the node_id. If you know the node_id then jump to point-2. Refer : NSX-T API usage

    GET https://<nsx-mgr>/api/v1/upgrade/upgrade-unit-groups?component_type=HOST

    Replace <NSX Mgr IP> with the IP address or FQDN of an NSX manager node.
    Look for the hostname of the ESXi which was decommissioned and pick the id. Example output below.

    "id": "########-####-####-####-772d60382090",
    "display_name": "<esx--fqdn>",
    "type": "HOST",

  2. Once you have the host UUID, delete the stale host using API. For NSX-T 3.2.x and 4.x, run the following API call:
    DELETE https://<NSX Mgr IP>/api/v1/transport-nodes/<UUID>?force=true&unprepare_host=false

    Ex: DELETE https://<NSX Mgr IP>/api/v1/transport-nodes/########-####-####-####-772d60382090?force=true&unprepare_host=false


    Note: Replace <UUID> with the id, as collected from above.
    Replace <NSX Mgr IP> with the IP address or FQDN of an NSX manager node.
    If using curl to run this API, the full url must be in double quotes.

  3. Wait five minutes, then run the GET transport node state command, and you should see the below output.
    GET https://<NSX Mgr IP>/api/v1/transport-nodes/<UUID>/state

    "The requested object : TransportNode/<id> could not be found" & "httpStatus" " "NOT_FOUND"



  4. Re-run the NSX Upgrade.

Additional Information