After update to vCenter 8, the vCenter inventory object in the hosts and clusters view of the vSphere Client inventory might be displayed as localhost instead of the vCenter FQDN.
VMware vCenter Server 8.0.x
This can be caused by a corrupt vpxd.cfg which triggers the vpxd process to start with default settings
$ /var/log/vmware/vmon/vmon.log
yyyy:mm:dd Wa(03) host-xxxxxx<vpxd> Service pre-start command's stderr: Failed to parse vpxd.cfg. File is not a valid XML! vpxd will launch with default settings. : Cannot parse file:/etc/vmware-vpx/vpxd.cfg
Verify if the vpxd.cfg is valid or corrupt using KB316610.
Steps to recreate and edit vpxd.cfg file:
Before making changes, take a valid snapshot or backup of the affected vCenter Server Appliance (VCSA) and any other nodes in the SSO domain.
Connect to the broken VCSA using SSH or console and collect the following:
hostname -f
/usr/lib/vmware-vmafd/bin/vmafd-cli get-machine-id --server-name localhost
/opt/vmware/vpostgres/current/bin/psql -V
cat /etc/vmware-vpx/vcdb.properties(This should return something like password = my-secret-password)
/opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgresThen at the prompt:
select id from VPX_ENTITY where name = '<VC VM Name>';(Replace <VC VM Name> with the actual name of the VCSA VM)
Deploy a temporary vCenter Server of the same version and build as the broken VCSA.
From the temporary VCSA, copy the file /etc/vmware-vpx/vpxd.cfg to your local PC using WinSCP or any SCP tool.
Choose one of the following options:
Option A-Edit on your local PC:
Open the file using a text editor, and make the following changes:
<key_EvaluationExpiryDate>.<hostnameUrl> value with the correct FQDN of the affected vCenter.<sso> section, ensure all <uri> entries point to the correct PSC FQDN (or VCSA FQDN if embedded).</registry>:<key_VCVmId>vm-XXXX</key_VCVmId> (replace XXXX with the ID from the database query)Option B -Edit directly on the affected VCSA using vi:
/tmp/vpxd.cfg on the broken VCSA. Then run:vi /tmp/vpxd.cfg
Make the same changes listed above using vi.
On the affected VCSA:
/etc/vmware-vpx/vpxd.cfg to vpxd.cfg.bak /etc/vmware-vpx/vpxd.cfgIf vcdb.properties contains a password, run:
/sbin/vpxd -p
You’ll be prompted to enter the password twice. If the file was empty, skip this step.
Run the following commands:
service-control --start vmware-vpxd