"Pre-upgrade checks failed for host.""Group contains upgrade units and cannot be deleted."VMware NSX
A stale transport node entry of a decommissioned host remains in the NSX Manager database.
Even though the host was removed from the vCenter inventory and had no NSX VIBs installed, its record is still being referenced in the upgrade group, preventing upgrade completion.
Before implementing the workaround below, please make sure that the problem ESXi is indeed a stale entry by validating its presence in vthe Sphere inventory
Workaround:
The stale transport node can be forcibly removed using the below API call as a root user:
DELETE https://<NSX-Manager-IP>/api/v1/transport-nodes/<Transport-Node-UUID>?force=true&unprepare_host=false
To run the command using SSH
curl -X DELETE 'https://<NSX-Manager-IP>/api/v1/transport-nodes/<Transport-Node-UUID>?force=true&unprepare_host=false' -k -u admin
Note: Please open a case with the Broadcom Support Team if the issue persists even after following the above workaround.
Additional reference : Installing or Upgrading NSX on an ESXi host fails reporting the node already exists