Symptoms:
For a large number of ESXi hosts, it is not the best practice to replace each ESXi host SSL certificate with custom-signed certificates manually.
To achieve this objective we have to change the vCenter server VMCA root certificate to be signed by the CA, As illustrated in the below figure:
Replacing the VMCA certificate with a signed root certificate will subsequently re-issue the vCenter Machine SSL, Solution Users, STS signing certificates and also will re-issue new signed certificates to the ESXi hosts that are signed by the VMCA that acts as a Subordinate CA.
Important: Before proceeding with the steps below, take both backup and a snapshot of the vCenter Server Appliance. If the vCenter is part of a Enhanced Linked Mode (ELM) replication setup, also take a backup or offline (powered off) snapshot of all replicating vCenter ELM nodes.
To replace the vCenter server's default self-signed VMCA with a custom-signed VMCA, need to follow the below workflow:
Generating the private key and Certificate Signing Request (CSR):
Creating a new template for vSphere 6.x/7.x to use for VMCA as a Subordinate CA on the MS CA Server:
Obtaining the VMCA Certificate from the MS CA Server:
Importing the signed certificate and key to the vCenter server:
Upload the ".CER" base-64-encoded file vmca_issued_fullchain.cer, vmca_issued_key.key, and root-ca.cer to the vCenter /tmp directory using WinSCP.
those files will be used to import the signed certificate to the vCenter server.
Note: We have two utilities that we can use to import the ".CER" base-64-encoded file and key
2. Import custom certificate(s) and key(s) to replace existing VMCA Root Signing certificate Option [1 or 2]: 2 Please provide valid custom certificate for Root. File : /tmp/FullChain.cer Please provide valid custom key for Root. File : /tmp/vmca_issued_key.key