When attempting to add a Trusted Root Certificate to the vCenter Server Certificate Store via the vSphere Client UI or CLI, the task fails. This issue is frequently seen when integrating external appliances like HPE OneView or during certificate renewals.
Symptoms
var/log/vmware/certificatemanagement/certificatemanagement-svcs.log, you find one of the following errors:[tomcat-exec-8 INFO com.vmware.cerfiticatemanagement.vapi.impl.setup.AuthzPermissionValidator] User ####\#### has required privileges (CertificateManagement.Administer) to invoke API com.vmware.vcenter.cestificate_management.create[tomcat-exec-8 INFO com.vmware.cerfiticatemanagement.impl.trustedroots.TrustedRootsChainCreator] TrustedRootsChain create operation is initiated [tomcat-exec-8 INFO com.vmware.cerfiticatemanagement.impl.trustedroots.TrustedRootsChainCreator] create vAPI call for Id : ###############[tomcat-exec-8 INFO com.vmware.cerfiticatemanagement.impl.trustedroots.TrustedRootsChainCreator] cert already exist for Id : ###############[tomcat-exec-8 INFO com.vmware.cerfiticatemanagement.impl.telemetry.TelemetryData] Attempting VAC stats push ....[tomcat-exec-8 WARN com.vmware.cerfiticatemanagement.impl.telemetry.TelemetryData] Publishing telemetry data to VAC failed with exception : Failed : HTTP error code : 400
This issue occurs due to one of the following reasons:
TRUSTED_ROOTS store.To resolve this issue, follow steps below:
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | lessExample: Alias : ####################################2e7f/root/ folder. /usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store TRUSTED_ROOTS --alias ####################################2e7f --output /root/<aliasID>.cer /usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert /root/<aliasID>.cerNote: Provide the SSO Password when prompted.
openssl x509 -in [certificate_file] -text -nooutCertificate Sign and CRL Sign. If these are missing, the certificate will be rejected by vCenter 8.x.Import the Trusted Root Certificate via CLI.
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert publish --cert /root/new-cert.cer/usr/lib/vmware-vmafd/bin/vecs-cli force-refresh/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | grep <aliasID>service-control --stop --all && service-control --start --allImport the Trusted Root Certificate via vCenter UI.