Certificate Status" or "Root Certificate about to expire."VMware vSphere Profile-Driven Storage Service Health Alarm" and "vpxd service down" as potential symptoms of stale certificates.The vCenter does not automatically purge expired or stale root certificates from the VECS TRUSTED_ROOTS store.
Prerequisites:
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | grep "Alias\|Not After\|Subject:\|Issuer:"/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | less/usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store MACHINE_SSL_CERT --alias __MACHINE_CERT --text | grep -A 2 "Authority Key Identifier"Retrieve Root Certificate Details: Extract the Subject Key Identifier (SKI) from the suspicious certificate in TRUSTED_ROOTS:/usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store TRUSTED_ROOTS --alias [ALIAS_NAME] --text | grep -A 2 "Subject Key Identifier"
Compare Identifiers:
If the AKI and SKI values match: The certificate is currently in use. Do not remove it.
If the values do not match: The certificate is safe to remove.
Unpublish expired/expiring certificates from TRUSTED_ROOTS VECS Store:
Using the Alias ID located in Step 2, run the following command to save the certificate to /root/ folder, adjusting appropriately for the environment:
/usr/lib/vmware-vmafd/bin/vecs-cli entry getcert --store TRUSTED_ROOTS --alias ####################################2e7f --output /root/<aliasID>.cer
Unpublish the expired/expiring CA certificate from VMDIR; it will prompt for SSO (Single Sign-On) Administrator credentials.
/usr/lib/vmware-vmafd/bin/dir-cli trustedcert unpublish --cert /root/<aliasID>.cer
Delete the certificate from VECS utilizing the Alias located in step 4b:
/usr/lib/vmware-vmafd/bin/vecs-cli entry delete --store TRUSTED_ROOTS --alias ####################################2e7f
Notes:
If the alias has special characters, enclose the entire alias in single quotes when using the vecs-cli command, for eg. --alias 'https://[IP]:9997/vasa'
If the command is failing with an error: "Operation failed with error ERROR_OBJECT_NOT_FOUND", ignore the error and proceed further. This error is received if the certificate is already removed from the store as part of step 4(b).
Perform a force refresh of VECS to sync the certificate from VMDIR:
/usr/lib/vmware-vmafd/bin/vecs-cli force-refresh
Confirm that the certificate is no longer present.
Note: Output of this command should not list the Alias ID that was removed in the above steps.
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text | grep <aliasID>
Restart all services on the vCenter, ensure that all services start and respond normally, and that login and management of the environment are functioning properly.
service-control --stop --allservice-control --start --all