Ga naar de inhoud
-
Never miss our best posts. Subscribe Now!
VCF Wizard VCF Wizard

VCF and More

VCF Wizard VCF Wizard

VCF and More

  • Home
  • 2026
  • GITHUB
  • Links
  • Home
  • 2026
  • GITHUB
  • Links
Sluiten

Zoeken

  • GitHub
  • Linkedin
  • Useful Links Not to Forget
Home/LAB/NSX precheck loops and upgrade fails with “must complete precheck first”
LABVCF Infrastructuur

NSX precheck loops and upgrade fails with “must complete precheck first”

Door hruis
oktober 20, 2026 3 Min lezen
0

SDDC Manager keeps re-running the NSX (and vCenter) upgrade precheck and never lets the upgrade start. Root cause: a stale ELM drift-detection resource lock in the SDDC Manager database.

Date

2026-10-20

Tags

VMware,VCF,VCF 9.1,SDDC Manager,NSX,vCenter,Upgrade,Troubleshooting

Summary

While upgrading a VMware Cloud Foundation (VCF) environment to the latest VCF 9.1.1 patch, the NSX upgrade in SDDC Manager gets stuck in a loop. The precheck completes successfully, but SDDC Manager doesn’t remember the result. Starting the upgrade fails with “must complete precheck first”, and the task resets back to the start.

The cause was a stale resource lock held by an LCM ELM-DRIFT_DETECTION operation in the SDDC Manager platform database. Removing the lock entry resolved the issue and the upgrade continued normally.

Environment

ItemValue
ProductVMware Cloud Foundation (VCF)
Target versionVCF 9.1.1 (latest patch)
ComponentSDDC Manager – Lifecycle Management (LCM)
Affected stepNSX upgrade (also reproduced with vCenter)

Symptoms

  • The NSX upgrade precheck runs and passes, but the result is not retained.
  • Clicking Upgrade fails with: must complete precheck first.
  • The upgrade task auto-fails. Running the precheck again (globally or on the individual object) resets the workflow back to the beginning — an endless loop.
  • Rebooting the SDDC Manager appliance does not help.
  • Skipping NSX and continuing with the vCenter upgrade shows exactly the same behavior, which indicates the problem isn’t component-specific.

Cause

SDDC Manager uses resource locks (stored in the lock table of the platform PostgreSQL database) to make sure only one operation works on a domain or system resource at a time.

In this case an LCM ELM-DRIFT_DETECTION operation had acquired a lock and never released it. Because the resource remained locked, the upgrade workflow couldn’t persist its precheck state or acquire the lock it needed to start, so it kept falling back to the precheck stage.

A reboot doesn’t clear this, because the lock is persisted in the database rather than in memory.

Resolution

⚠️ Important

  • Take a snapshot of the SDDC Manager appliance before modifying the database.
  • In production environments, consider opening a support request with Broadcom before making database-level changes.
  • Make sure no legitimate operation is still running before you remove a lock.

1. Log in to SDDC Manager and switch to root

SSH to the SDDC Manager appliance as the vcf user, then:

bash

su -

2. List the current resource locks

bash

psql -h localhost -U postgres -d platform -c "select * from lock;"

Look for the lock entry owned by the drift-detection operation (service/owner referencing ELM-DRIFT_DETECTION / elm-drift-detection). Note its id.

3. Delete the stale lock

Replace <LOCK_ID_OR_OPERATION_ID> with the ID from the previous step:

bash

psql -h localhost -U postgres -d platform -c "delete from lock where id='<LOCK_ID_OR_OPERATION_ID>';"

4. Verify the lock is gone

bash

psql -h localhost -U postgres -d platform -c "select * from lock;"

5. Retry the upgrade

Go back to SDDC Manager, run the NSX precheck once more and start the upgrade. The precheck result is now retained and the NSX upgrade proceeds. Continue with the remaining components (vCenter, etc.) as usual.

Alternative: remove the lock through the API

Instead of editing the database directly, resource locks can also be listed and released via the /v1/resource-locks API, as described by William Lam for the VCF 9.0 Installer. Run this from the appliance:

bash

# Get an access token
TOKEN=$(curl -s -k -H 'Content-Type: application/json' https://localhost/v1/tokens \
  -d '{"username":"<user>","password":"<password>"}' | jq -r '.accessToken')

# List current locks
curl -k -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -X GET https://localhost/v1/resource-locks

# Release the lock (use serviceId, resourceType, resourceName and operationId from the output above)
curl -k -H "Content-Type: application/json" -H "Authorization: Bearer $TOKEN" \
  -X DELETE https://localhost/v1/resource-locks \
  -d '{"serviceId":"elm-drift-detection","resources":[{"resourceType":"system","resourceName":"SYSTEM"}],"operationId":"<OPERATION_ID>"}'

Key takeaways

  • An upgrade that loops on a successful precheck usually points to a lock problem, not a precheck problem.
  • Rebooting SDDC Manager won’t clear persisted resource locks.
  • Always check select * from lock; in the platform database when LCM operations behave unexpectedly.

References

  • Broadcom KB 449148 – vCenter Upgrade Switchover Fails Due to Domain Resource Lock by OPERATIONS_MANAGER Task
  • William Lam – Clearing resource locks with VCF 9.0 Installer
Auteur

hruis

Volg mij
Andere artikelen
Vorige

SFTP and Credential Gotchas Explained for VCF Backup

www.itq.eu
https://github.com

https://henkruis.github.io/Website/#

GITHUB WEBSITE

  • oktober 2026
  • augustus 2026
  • juli 2026
Copyright 2026 — VCF Wizard. All rights reserved.