Symptoms
Upgrading vCenter server from 6.0 to 6.5 pre-installation fails with "Pgpass.conf file cannot be found"
Cause
pgpass.conf file is missing in below location C:\Windows\System32\config\systemprofile\AppData\Roaming\postgresql\pgpass.conf
Resolution
To resolve this issue we need to create the missing pgpass.conf file using below steps:
Go to the below location and add the contents.
Location: "C:\Windows\System32\config\systemprofile\AppData\Roaming\postgresql\pgpass.conf"Create a new text file with name pgpass.confAdd the below content and save pgpass.conf file
localhost:5432:postgres:postgres:new_password127.0.0.1:5432:postgres:postgres:new_passwordlocalhost:5432:VCDB:postgres:new_password127.0.0.1:5432:VCDB:postgres:new_password
Login to the VCDB and update the password using with the new password created in the previous step,
/opt/vmware/vpostgres/9.0/bin/psql -d VCDB -U postgresALTER USER postgres PASSWORD 'new_password';
Note: You need postgres account password to create this file, if not aware of the password you can refer vcdb.properties if that does not work, you can be reset the password using KB article.