I successfully tackled the certificate issues, spent 8 hours, hope anyone having the same cert renewal issue may find help from my notes.
=========================================================================
* VMware certificates in vCenter, PSC, VMCA and certificates
- Notes
- PSC (Platform Service Controller): controlls idendity service (LDAP integration, SSO) and certficates(VMCSA)
- VMCA (vmware certificate authority) is a part of PSC controlling certificates used between vCenter and ESXi(Machine Certifictes), service to service (Solution User Certificates). The root certificate is self-signed by VMCA.
- VECS: repository for SSL certs and private keys.
- vCenter Applicance Manager web
https://vcenter:5480
- vCenter PSC web (VMCA)
https://vcenter/psc
- certificates renewed, replaced using PSC web interface or /usr/lib/vmware-vmca/bin/certificate-manager
- How to use vSphere Certificate Manager to Replace SSL Certificates (2097936) https://kb.vmware.com/s/article/2097936
- Cert Types
- STS cert (SSO. This is not managed by PSC GUI or certificate-manager.
- 1 CA root (VMCA self-signed)
- 1 Machine cert
- 4 Solution User certs
- Check current certificates in PSC
- STS cert(SSO): You need to use scripts to check(checksts.py) and renew(fixsts.sh) https://kb.vmware.com/s/article/79248
- https://vcenter/psc (administrator@vsphere.local / ...)
- Certificates> Certificate Management
- 1 _MACHINE_CERT: proxy cert. all the endpoints communicate through this trusted ssl cert.
- 4 Solution user Certs:
- vpxd: cert for vCenter
- vpxd-extention: used by Auto Deploy, Inevntory Service--
- vsphere-webclient: used for vSphere Web Client
- machine: logging-service, compoment manager, license server.
- 1 Trusted Root Cert: VMCA self-signed root cert
- Renews certificates
- How to regenerate vSphere 6.x certificates using self-signed VMCA (2112283) https://kb.vmware.com/s/article/2112283
- Before renewing certificates, Make sure STS certificate(SSO token singing cert) is not expired. Please renew.
- Run checksts.py to see if STS certs are not expired. Checking Expiration of STS Certificate on vCenter Server (79248) https://kb.vmware.com/s/article/79248 or you can check from vCenter>Administration> Single Sign-On> Configuration> Certificate> STS Signing.
- Run fixsts.sh STS certificates. "Signing certificate is not valid" - Regenerating and replacing expired STS certificate using PowerShell script on vCenter Server 6.5/6.7 installed on Windows (79263) https://kb.vmware.com/s/article/79263
- Renew CA root(if needed), 1 Machine cert and 4 Solution User certs
- GUI method
- go to PSC web interface: https://vcenter/psc (administrator@vsphere.local / ...)
- menu: Certificates> Certificate Management
- _MACHINE_CERT: click renew
- Solution user Certs: click renew all
- Trusted Root Cert: We keep root cert signed by VMCA self-signed.
- Command method
- https://kb.vmware.com/s/article/2112283
- /usr/lib/vmware-vmca/bin/certificate-manager
- Option 3(machine cert) then Option 6(4 solution user certs)
-or Option 4. Regenerate a new VMCA Root Certificate and replace all certificates
- Restart vCenter applicance instead or do;
Command> shell
service-control --stop --all
service-control --start vmafdd
service-control --start vmdird
service-control --start vmcad
service-control --start --all (this step is missing from the above linked article)
- Stopping, Starting or Restarting VMware vCenter Server Appliance 6.x & above services (2109887)https://kb.vmware.com/s/article/2109887
- Disconnect and Reconnect hosts to vCenter
- When new certs are generated in vCenter, the ESXi hosts will have issues in communication to vCenter and show red exclamation mark on hosts. You need to re-joint host to vCenter, then push certs to hosts.
- RC on a host> Connection> Disconnect
- RC on a host> Connection> Connect (This will fail then bring up Add Host wizard instead. Follow it to add the host to vCenter)
- RC on a host> Certificate> Renew Certificate (This will push vCenter machine cert to hosts)
- Other commands
/usr/lib/vmware-vmafd/bin/vecs-cli store list (List cert store list)
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store TRUSTED_ROOTS --text |less (show a trusted root cert detail)
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store MACHINE_SSL_CERT --text |less (show a machine cert cert detail)
/usr/lib/vmware-vmafd/bin/vecs-cli entry list --store machine --text |less (show a solution user cert detail)
cat /var/log/vmware/vmcad/certificate-manager.log (certificate-manager command logs)