Unable to update the VC, Error: Update not possible while [vc] and undefined is in failed state
search cancel

Unable to update the VC, Error: Update not possible while [vc] and undefined is in failed state

book

Article ID: 316023

calendar_today

Updated On:

Products

VMware Cloud Foundation

Issue/Introduction

Resolve the failed state on the vCenter, and set the vCenter back to active to be able to attempt the update.

Symptoms:

Unable to update the VC, Error: Update not possible while [vc] and undefined is in failed state

 
 



Environment

VMware Cloud Foundation 4.x

Cause

The VC status has been marked as ERROR state due a pervious workflow/task failure.
Usually, this is a failed password rotation task.

When LCM precheck is run, it fails at 'VC Inventory Status Check' due to VCENTER <id> status in ERROR which is an expected behaviour.

Example of the proposed remediation displayed in the failed pre-check:

 

Resolution

This issue has been fixed in SDDC Manager 4.2

Workaround:
We need to reset the VC State to ACTIVE.

Steps to follow:

  1. SSH to SDDC Manager VM with vcf user and elevate to root with su
  2. List the upgrades from LCM to determine the ID of the failedDomains:
    • curl localhost/lcm/inventory/upgrades | json_pp
      • Example output:
  3. Check the state of the VC from the SDDC DB:
    • Connect to the Platform DB
      • psql -h localhost -U postgres -d platform
    • Check the current state of the Inventory using the id from output above:
      • select * from vcenter where id='57452ad9-dbbf-40ae-bd5d-b4e9028e7197';
        • Example output:
    • Exit the postgres shell
      • #\q
  4. Use the following API command to set the VC state to ACTIVE:
    • curl localhost/inventory/entities/57452ad9-dbbf-40ae-bd5d-b4e9028e7197 -X PATCH -d '{"type" : "VCENTER","status":"ACTIVE"}' -H 'Content-Type:application/json'
  5. (Optional) Connect to the DB again and recheck the state of the vCenter to confirm that the status shows ACTIVE
  6. Re-run the Pre-upgrade check again and we should no longer see the VC Inventory state error, and you should be able to proceed with the VCF upgrade.



Additional Information

Impact/Risks:
Unable to update the VC in a domain, and halts the VCF update/upgrade.