vCenter 7.X Upgrade Failed – Exception occurred in install precheck phase

I was working on upgrade of our entire VMware platform to prepare the environment ready for NSX-V to NSX-T migration. One among the preparation activity was to upgrade vCenter server from 7.0 u1 to 7.0U3. I did the upgrade of more than 10 vcenter servers from 7.0 U1 to 7.0 u3 in our environment. I didn’t face any issues with the upgrade other than one vcenter Server.

Immediately after I initiated the upgrade of the vcenter server from the VAMI page, I got the page of pre-upgrade completed successfully and when I click on next to continue, got an error ” Exception occurred in install precheck phase”, Which also given resume option, but upgrade is not moving anywhere. I refreshed the VAMI page and tried multiple times. Nothing helped.

Vcenter Upgrade-Exception

 

Finally, my google search redirected me towards the VMware KB article. As per KB article, Patching to vCenter Server 7.0 U2 version fails with “Exception occurred in install precheck phase” or any patch failures which might occur before RPM installation.

This issue may happen during the staging phase of update cycle, not all files required for update are downloaded just in time and the race conditions which will lead to overwriting of certain files essential for the patch process. As per the KB, this issue is resolved in VMware vCenter release 7.0 U3c.

Resolution:

Please follow the below steps to apply the workaround:

Note: Follow the below steps only when the patch is failed before RPM installation.

  1. Take a snapshot of the VC, login into putty/ssh session to VC
  2. Download the script KB_83145_PatchCleanupScript.sh from the attachment section in the KB to the root folder of the VC.
  3. Provide executable permissions to the script, run the command:
                 chmod +x KB_83145_PatchCleanupScript.sh
  1. Run the script using the command:
                 ./KB_83145_PatchCleanupScript.sh
Exception occurred in install precheck phase
  1. Once the script execution is complete, You will see message ” VC Failed patch bits cleaned up successfully”.
  2. Go to VAMI page using url https://<VC_IP or VC_FQDN>:5480 enter the root credentials.
  1. Click on Update > Check Updates, select the target update from the list.
    • Note: Wait for the updates to load, do not click on refresh.
  2. Proceed with upgrade by clicking on “Stage” or “Stage and Install”.

This patch cleanup script fixed the issue in my environment. I have restarted the upgrade, and everything went well. I hope this article is informative for you. Thanks for Reading the article. Kindly share with social media, if you feel worth sharing it.