This article aims to assist users in recovering the service account credential that gets lost when the vCenter Server crashes, or after doing NDU upgrade.
Symptom 1:
In a Cross vCenter vSAN HCI Mesh, the health check will report a remote VC connectivity issue, and the user cannot perform Datastore source and Datastore management operations, such as destroying the datastore source, mounting or unmounting datastores of the remote VC.
When the client vCenter tries to connect to the server vCenter, the following error may be seen in the below log.
/var/log/vmware/vsan-health/vmware-vsan-health-service-6.log
####-##-##T##:##:##.###Z ERROR vsan-mgmt[19586] [VsanXvcPCManager::RefreshRemotePropertyCollectorInternal opID=7adf5445-W289] Cannot connect to remote VC: <vCenter FQDN>
return self._stub.InvokeMethod(self, info, args)
PyCppVmomi.vim.fault.NotAuthenticated: (vim.fault.NotAuthenticated) {
msg = "Received SOAP response fault from [<SSL(<io_obj p:0x00007f37d00e6860, h:78, <TCP '<IP ADDRESS> : 53792'>, <TCP '<IP ADDRESS> : 443'>>), /vsanHealth>]: createPropertyCollector\n",
object = 'vmodl.query.PropertyCollector:vsan-property-collector',
privilegeId = ''
}
Symptom 2:
For client vCenter after NDU upgrade, the 'Datastore Management' and 'Remote Datastores' info are missing from UI. And the following error may be seen in log file
/var/log/vmware/vsan-health/vmware-vsan-health-service.log:
####-##-##T##:##:##.###Z ERROR vsan-mgmt[70456] [VsanXvcPCManager::RefreshRemotePropertyCollectorInternal opID=23b9510f] Cannot connect to remote VC: <IP ADDRESS>
Traceback (most recent call last):
File "bora/vsan/clusterconfig/vpxd/pyMoVsan/VsanXvcPCManager.py", line 102, in RefreshRemotePropertyCollectorInternal
File "bora/vsan/xvc/DSConnMgr.py", line 47, in GetDSConnection
PyCppVmomi.vim.fault.FileFault: (vim.fault.FileFault) {
msg = '',
file = 'Failed to open key file /storage/vsan-health/xvchcimesh/xvcEncKey.7.dat'
}
Please refer to the screenshot below:
For the Symptom 1, when the server vCenter experiences an unexpected crash or is restored from an old backup, the service account credential of the client vCenter may be lost from persistent storage. As a result, the client vCenter may be unable to connect to the server vCenter.
For the Symptom 2, during the client vCenter NDU upgrade process, the key file "xvcEncKey.*.dat" is not copied to the target folder correctly, so when trying to query 'Datastore Management' and 'Remote Datastores', it cannot work well.