Ensure Postgres DB version is correct (if no entry in vpxd.cfg for db version, skip this step) by running;
/opt/vmware/vpostgres/9.6/bin/psql -V.
If the VC is self managed, i.e. the VC VM is in the inventory of itself, we need to then add or updated the <key_VCVmId> to the Entity ID of the VC's VM. We can find the ID of the VM from the database by running the commands below. The VM ID is vm-<ID>
In another SSH session, login to Database on VCSA:
select id from VPX_ENTITY where name = '<VC VM Name>';
Quit from PSQL using \q and enter.
Update the key_VCVmId field in the vpxd.cfg file to look like (it should be placed above </registry> tag):
<key_VCVmId>vm-1017</key_VCVmId>
Save the vpxd.cfg file into the correct location (NOTE: This overwrites the existing vpxd.cfg, ensure you backed up the existing file prior just in case)
cp /tmp/vpxd.cfg /etc/vmware-vpx/vpxd.cfg
Update the VCDB password within the new vpxd.cfg with the previous one.
Cat the file: /etc/vmware-vpx/vcdb.properties It should look something like:
password = g4XaA?QR%p(CWc2o
Now run this command to update the DB password in the vpxd.cfg file, use the password from the previous step. It should prompt for the password twice then exit cleanly.