vCenter Server certificate validation error for external solutions in environments with vCenter Server 7.0
book
Article ID: 322183
calendar_today
Updated On:
Products
VMware vCenter Server
Issue/Introduction
Some solutions, such as VMware vCenter Site Recovery Manager, VMware vSphere Replication, or VMware vCenter Support Assistant are always installed on a different machine than the vCenter Server system.
If you replace the machine SSL certificate of a vCenter Server system with an embedded Platform Services Controller, a connection error results when the solution attempts to connect to the vCenter Server system. The reason is that the vCenter Server system uses a new certificate, but the corresponding registration with the VMware Lookup Service is not updated. When solutions connect to vCenter Server, they use the service registration information, which includes the service URL and the sslTrust string. The sslTrust string is the Base 64 encoded certificate.
This article explains how to resolve the issue in environments with vCenter Server 7.0 which is by default with Embedded Platform Services Controller.
Using the output from the openssl s_client and the lstool.py, verify if the returned SSL certificates match for your vCenter Server. If they do match, you do not need to continue. If they do not match, proceed to Task 1: Retrieving the Old Certificate to start updating the sslTrust anchors.
Note: If you have more than one vCenter Server in a vSphere domain (Enhanced Linked Mode), repeat the steps for each vCenter Server in the environment.
Task 1: Retrieving the Old Certificate
You can retrieve the old certificate using lstool.py (Step 3 of Task 0).
On the vCenter Server, create a directory to store the old certificate. This article uses the location '/certificates'
Run this command to get the old certificate stored for the vCenter Server:
/usr/lib/vmware-lookupsvc/tools/lstool.py list --url https://localhost/lookupservice/sdk --no-check-cert --ep-type com.vmware.cis.cs.identity.sso 2>/dev/null
For example:
Note: SSL trust was truncated for readability.
Service Product: com.vmware.cis Service Type: cs.identity Service ID: ########-####-####-####-########5141 Site ID: default-site Node ID: ########-####-####-####-########efd1 Owner ID: [email protected] Version: 2.0 Endpoints: Type: com.vmware.cis.cs.identity.sso Protocol: wsTrust URL: https://vcenter.example.local/sts/STSService/vsphere.local SSL trust: LIIDeDCCAmCgAwIBAgIJAP7kGwWSSd0yMA0GCSqGSIb3DQEBCwUAM+++wnWkeAeqnGRYvzifG9M6DK/YMP1S/akAJ...DS7Y85NorISiQfAVy/R2wjP4rNWDfN9DMCcwfPvw/0nFwrpr+0Cg==
Copy the Base64 encoded string from field 'SSL trust' to a file and save the file as old_machine.crt
Open old_machine.crt in a text editor.
Append -----BEGIN CERTIFICATE----- to the beginning of the text string, and append -----END CERTIFICATE----- to the end of the text string. Add a carriage return after the 64th character of each line of the contents copied from the sslTrust field.
Run the ls_update_certs.py script on the vCenter Server. To successfully run the script, you must have both the thumbprint of the old vCenter Server certificate and the new vCenter Server certificate.
Warning: Perform a backup or offline snapshot of all the vCenter Servers in Enhanced Linked mode before proceeding with below steps, so that you can recover if problems result.
Running ls_update_cert on the Appliance
The ls_update_certs.py script is located at /usr/lib/vmware-lookupsvc/tools/
Change directory to /usr/lib/vmware-lookupsvc/tools/ with the following command:
[email protected] [ /usr/lib/vmware-lookupsvc/tools ]# python ls_update_certs.py --url https://vcenter.example.local/lookupservice/sdk --fingerprint ##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:##:## --certfile /certificates/new_machine.crt --user [email protected] --password 'Password' 2>/dev/null
Get service ########-####-####-####-########53b6
Update service ########-####-####-####-########53b6; spec: /tmp/svcspec_hvu8kxs8
Get service ########-####-####-####-########c392
Update service ########-####-####-####-########c392; spec: /tmp/svcspec_kost4p0i
.
.
Get service ########-####-####-####-########bfdc
Don't update service ########-####-####-####-########bfdc
Get service ########-####-####-####-########c918
Don't update service ########-####-####-####-########c918
Updated 41 service(s)
[email protected] [ /usr/lib/vmware-lookupsvc/tools ]#
Lookup service URL. On the vCenter Server, use the following URL as a model: https://external_platform_services_controller_FQDN.example.com/lookupservice/sdk
OLD_CERT_SHA1_HASH
Thumbprint of the certificate that vCenter Server used before certificate replacement acquired in Task 2.
Note: VMware does not recommends to find the old vCenter Server certificate in the filesystem.
NEW_CERT_PEM_FILEPATH
PEM encoded file of the new vCenter Server machine SSL certificate acquired in Task 3.
Use the file that you just passed in as part of certificate replacement. If you no longer have that file, use the process in Retrieving the New Certificate.
Note: Attempting to find the new vCenter Server certificate in the filesystem is not recommended.
USER and PASSWORD
User with administrator privileges for vCenter Single Sign-On.