During the upgrade of VMware vCenter Server to version 9.1.0.0300, the installation process fails. The upgrade script fails, and the following error appears in the upgrade logs.
Log location :/var/log/vmware/vpxd/vcdb_inplace.err
ERROR: insert or update on table "vpx_host_crypto_tag_keys" violates foreign key constraint "fk_vpx_host_crypto_tag_keys" DETAIL: Key (key_id)=(####) is not present in table "vpx_host_crypto_keys".
Orphaned records exist in the vc.vpx_host_crypto_tag_keys table. The upgrade process attempts to enforce a foreign key constraint requiring that every key_id in the tag table must exist in the primary vc.vpx_host_crypto_keys table.
Log in to the Source vCenter
SSH into your source vCenter Server Appliance (VCSA) using the root account.
Take an offline snapshot or valid backup of the vCenter Server Appliance (VCSA) before proceeding.
NOTE : To Delete the records reach out to Broadcom Support.
4:Exit the database utility: \q
5: Retry the vCenter Server upgrade.