Change the Machine SSL Certificate of vCenter Server
vCenter Server
You can change the machine SSL
certificate of a
vCenter Server
system by using
the TLS and the TLS CSR interfaces of the vSphere
Automation
API.- Verify that you are connected to avSphere AutomationAPI server.
- Verify that the root certificate of the CA you are going to use is available on your machine.
- Verify that you have the required privileges:and .
The machine SSL certificate is used for server verification and for secure communication such as HTTPS or LDAPS. The machine certificates are the human-facing certificates in vSphere. They are used to create an SSL socket on the server side to which SSL clients can then connect.
Changing the machine SSL certificate with one issued by an official or enterprise certificate authority is an essential part of the Hybrid Mode of vSphere certificate management. In this mode, you replace the machine SSL certificate and you leave the VMCA to manage all other certificates automatically. The VMCA is a just-enough internal certificate authority that comes integral with your vSphere deployment. It has been purpose-built to serve the certificate needs of your vSphere environment. For more information on vSphere certificate management, see the
vSphere Authentication
guide.- Retrieve the current Machine SSL certificate of yourvCenter Serversystem.GEThttps://<vcenter_ip_address_or_fqdn>/api/vcenter/certificate-management/vcenter/tls
- Generate a certificate signing request (CSR) by using theTLS CSRfunctionality.
- Populate theCertificateManagementVcenterTlsCsrSpecdata structure.ParameterTypeDescriptioncountryStringSpecifies the country in the certificate subject.state_or_provinceStringSpecifies the state or province in the certificate subject.localityStringSpecifies the locality in the certificate subject.organizationStringSpecifies the organization in the certificate subject.organization_unitStringSpecifies the organization unit in the certificate subject.email_addressStringSpecifies the email address in the certificate subject.
- Make the request.POSThttps://<vcenter_ip_address_or_fqdn>/api/vcenter/certificate-management/vcenter/tls-csr
The system returns the CSR in PEM format. - Save the CSR to your machine.
- Send the CSR to the certificate authority of your choice.The private key corresponding to the public key generated by the CSR is stored in thevCenter Serverkeystore and does not exit your system.
- Save the issued Machine SSL certificate to your machine.
- Set the new custom certificate to yourvCenter Serversystem by using theTLSfunctionality.
- Populate theCertificateManagementVcenterTlsSpecdata structure.ParameterTypeDescriptioncertStringThe Machine SSL certificate in PEM format. You must also paste the intermediate CA certificate, if you have one. The certificates must be JSON string escaped for newline (\n).root_certStringThe third-party root CA certificate in PEM format. You must also paste the intermediate CA certificate, if you have one. The certificates must be JSON string escaped for newline (\n).You must not provide the private key as it was generated with the CSR and is already saved to your system.
- Make the request.
PUThttps://<vcenter_ip_address_or_fqdn>/api/vcenter/certificate-management/vcenter/tlsThe system returns a 204 error, which means that the request was processed successfully but no content is returned.Restart ofvCenter Serverservices after the certificate change is not necessary. The certificate replacement is completed seamlessly and all your sessions remain active.