Symptoms:
"A general system error occurred: Unable to push CA certificates and CRLs to host"
/var/run/log/hostd.log
file on the ESXi host, the following entries may be observed:[YYYY-MM-DDTHH:MM:SS] error hostd[2099958] [Originator@6876 sub=Vimsvc.CertMgr opID=xxxxxxx-86e0-4120-a9c5-xxxxxx-122905-auto-122907-h5c:70009449-db-6fa0 user=vpxuser:VSPHERE.LOCAL\administrador] Certificate is not a valid CA certificate:
-----BEGIN CERTIFICATE-----
<certificate string>
--> -----END CERTIFICATE-----
Task Created : haTask--vim.host.CertificateManager.replaceCACertificatesAndCRLs-xxxxx
[YYYY-MM-DDTHH:MM:SS] info hostd[3597154] [Originator@6876 sub=Vimsvc.CertMgr opID=m5f9ixec-#######-auto-#####-h5:########-fc-#### user=vpxuser:EXAMPLE_DOMAIN\EXAMPLE_USER] Discarding non-CA certificate:
-----BEGIN CERTIFICATE-----
--> RAW CERT STRING
-----END CERTIFICATE-----
Note: This issue may occur due to time sync issues, if the time on ESXi host is out of sync with the time on the vCenter Server. Please verify that the time on the ESXi host and vCenter are in sync before proceeding with the steps below.
To resolve the issue, perform one of the options below:
Option 1:
Remove the Non-CA or Self-Signed certificates from the TRUSTED_ROOTS store of vCenter Server by following the steps below.
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | egrep 'Alias|Key Usage' -A 1 | grep -v "Entry type"
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | egrep 'Alias|Key Usage' -A 1 | grep -v "Entry type"
Alias : e74##########c2c6a44312962be############
--
X509v3 Key Usage: critical
Certificate Sign, CRL Sign
Alias : 5de##########ddad3d4c38447210f##########
--
X509v3 Key Usage:
Digital Signature, Key Encipherment, Key Agreement
/usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store TRUSTED_ROOTS --alias <alias name> --output /var/tmp/<aliasname.crt>
/usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store TRUSTED_ROOTS --alias 5de##########ddad3d4c38447210f########## --output /var/tmp/55de##########ddad3d4c38447210f##########.crt
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert <certificate full path> --login administrator
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert /var/tmp/5de##########ddad3d4c38447210f##########.crt --login administrator
dir-cli unpublish
command should automatically delete the certificate from the TRUSTED_ROOTS store if it is published. If not, execute the command below to remove the certificate from the VECS store:/usr/lib/vmware-vmafd/bin/vecs-cli entry delete --store TRUSTED_ROOTS --alias <alias name> -y
/usr/lib/vmware-vmafd/bin/vecs-cli entry delete --store TRUSTED_ROOTS --alias 5de##########ddad3d4c38447210f########## -y
Option 2:
Modify the ESXi advanced option "Config.HostAgent.ssl.keyStore.allowSelfSigned" introduced in ESXi 6.7 Update 3 to ignore the Self Signed Certificates.