• Home
  • VMware QuickDocs
    • Getting Started with VMware Cloud Foundation
    • VMware General
    • vSphere
    • vSAN
    • Horizon
    • NSX
    • vRealize Suite (renamed to Aria Suite)
    • Aria Suite
      • Aria Automation
      • Aria Operations
      • Aria Operations for Logs
      • Aria Automation Orchestrator
    • Podcasts
  • Home Lab
  • VMware Stickers
  • mac OS Tips
  • About Me
    • Privacy Policy
    • Cookie policy
Cybersylum

Cybersylum

  • Home
  • VMware QuickDocs
    • Getting Started with VMware Cloud Foundation
    • VMware General
    • vSphere
    • vSAN
    • Horizon
    • NSX
    • vRealize Suite (renamed to Aria Suite)
    • Aria Suite
      • Aria Automation
      • Aria Operations
      • Aria Operations for Logs
      • Aria Automation Orchestrator
    • Podcasts
  • Home Lab
  • VMware Stickers
  • mac OS Tips
  • About Me
    • Privacy Policy
    • Cookie policy

Hybrid vSphere SSL Certificate Replacement

byArron King 01.31.2024 Certificates VCSA

When it comes to SSL Certificates and vCenter, there are a few options:

  • Use the Self-Signed Certificates that are the default – ignore the untrusted certificate warning and go about your day
  • Use the Self-Signed Certificates that are the default and Download the self-signed vCenter Certificate Chain to add it to your computer’s trustedSecured by SSL certificate store. This makes the untrusted cert warnings go away. It is easy to manage if you have a small number of administrators.
  • Make the Certificate Authority in vCenter (VMCA) a Subordinate CA to your in-house Certificate Authority.  This option replaces all certficates in your vSphere environment.  It has an important security factor which you must consider
  • Replace the SSL Certificate on the vCenter front-end with a standard SSL Certificate; but allow the VMCA to self-sign certificates for each host.  This is called Hybrid vSphere SSL Certificate Replacement, and is considered by many to be the best balance of security and risk.

Why Hybrid vSphere SSL Certificate Replacement over Subordinate CA?

Making the Certificate Authority in vCenter (VMCA) a Subordinate CA to your Enterprise CA is does work.   All certificates in your vSphere environment (vCenter and hosts) will have enterprise trusted certificates.  Before deciding on this approach,  It is important to look at this from a security standpoint.

When the VMCA has a subordinate CA certificate from your Enterprise CA – it can generate certificates that are trusted by your entire enterprise.  This could allow a rogue admin or bad actor to use this powerful certificate to  create unauthorized certificates which would be trusted by your organization. You should review this in light of the security policies in your organization.

In Hybrid vSphere SSL Certificate Replacement, only the vCenter Machine SSL Certificate is replaced.  This certificate is a standard SSL Certificate and cannot be used to generate other certificates.   This still provides trust that access to vCenter Server is secure with less risk.

This method does not replace the certificates on each vSphere host with an enterprise trusted certificate; but consider the following:

  • The majority of your time spent managing a vSphere environment should be using vCenter
  • If a host certificate changes – this will cause issues with vCenter-host communication and should trigger an alarm
  • If you absolutely need additional assurance of the host certificates, you can download the self-signed vCenter Certificate Chain and import this into your computer’s trusted certificate store.  This is a low-risk method to ensure secure communication to hosts

Replacing the Machine SSL Certificate in vCenter

Before you begin

It’s always a good idea to take a snapshot of vCenter before making significant changes like this.  Make sure you are taking a snapshot of vCenter the right way.  While you are at it – take a few moments and configure your vCenter Server Backup.

Generate the Certificate Signing Request

There are multiple ways to do this.  I prefer using OpenSSL which makes it easy for me to rinse and repeat the process as needed in my environment.

Generate a private key

openssl genrsa -out vcsa.key 2048

Create an OpenSSL config file

This can be done in any text editor.  I will name this file vcsa.cnf.  Substitute your own values

[req]
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no

[req_distinguished_name]
C = US
ST = Ohio
L = Columbus
O = Cybersylum
OU = Cybersylum Labs
CN = vcsa.cybersylum.com

[req_ext]
subjectAltName = @alt_names

[alt_names]
IP.1 = 172.16.1.3
DNS.1 = vcsa.cybersylum.com
DNS.2 = vcsa
A little more on the OpenSSL Config File

The alt_names section allows this certificate to be considered valid if you use the IP or any of the DNS names to access vCenter. A single DNS name definition is the only required value.  The rest are optional.

The OpenSSL documentation has additional detail on the config file syntax

Create the Certificate Signing Request (CSR)

openssl req -new -key vcsa.key -out vcsa.csr -config vcsa.cnf

This takes files created earlier and outputs file named vcsa.csr  which you can take to any Certificate Authority to obtain the SSL Certificate.  I use an internal Microsoft CA and requested a certificate using the Web Server template.

Installing the new Machine SSL Certificate

Once the new SSL Certificate has been generated, you are ready to install.  You will also need:

  • The private key used in creating the CSR
  • The full certificate chain from the Certificate Authority that issued the certificate.  This file should contain certificates for all CAs in the chain.

These certificates should be in the PEM format.  OpenSSL can help convert formats if needed.

Copy these 3 files to your vCenter Server Appliance.  This can be done in one of two ways

  1. All of these files are simple hashed text.  You can copy and paste the exact contents into an editor running in an SSH session
  2. You can SCP the files to the appliance filesystem.  I recommend putting them in /tmp.
Using SCP to copy files to the VCSA

The default shell for the VCSA is not bash and this can prevent SCP from working.  If you see the following when you connect to the VCSA over SSH, you will need to make a change

VCSA Appliance Shell

 

 

 

 

Launch the Bash shell by typing:

shell.set --enabled true
shell

Next, change the default shell to bash for the root account:

chsh -s /bin/bash root

Setting the default shell to bash will allow us to use SCP later.  This setting can be reversed when these changes are complete.  The full details for this process can be found in KB 2100508.

Connect to the VCSA as root using SSH. Now launch the Certificate Manager

/usr/lib/vmware-vmca/bin/certificate-manager

VMCA - Certificate Manager

 

 

 

 

 

 

Choose Option 1 – Replace Machine SSL Certificate.

You will see the following prompts

  • password for [email protected] (or the local SSO admin in your environment)
  • generate CSR or import certificate – Choose Option 2 – Import
  • Path to certificate file
  • Path to private key
  • Path to Signing Certificate – this is the Root CA Chain file
  • Confirmation to replace the Machine SSL Certificate

Prompts when replacing the vCenter Machine Certificate

 

 

 

After you type Y and hit Enter, the VMCA will apply the new certificate and restart vCenter Services.

Once the services have restarted, you can access vCenter from your web browser and verify the new certificate is in place.  In the example below – note the details about the certificate issuer.  This is the MS Enterprise CA in my lab.

vCenter SSL Certificate view after replacing

 

 

 

 

 

Follow up Steps
  • Depending on where your certificate was issued, you may need to reconfigure any other software platforms that communicate with vCenter so they accept the new certificate.  This can include other VMware products (Aria Automation or Operations), or 3rd party products like Backup or monitoring solutions.
  • Once you are satisfied that the change was successful – remember to remove the vCenter snapshot.

Share this:

  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn

Using OpenSSL to create SSL Certificates for vSphere

My Notes - Introduction to Swift

1 thought on “Hybrid vSphere SSL Certificate Replacement”

  1. Navid Hosseinzadeh
    04.28.2024 at 3:55 am

    thank you for this useful post. it was informative

    Reply
Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search

Disclaimer

The content and opinions on this site belong to me - not my employer.

You are welcome to use any ideas or code from this site. You have the responsiblity to test these before using in a production environment.

Upcoming Events

  • Wed
    22
    Oct
    2025

    Cincinnati VMware VMUG UserCON

    Save The Date!

    The VMware VMUG UserCON returns to Cincinnati in October 2025

Categories

Aria Automation Aria Operations for Logs Before I Forget Certificates Education Home Lab Horizon View Importing vSphere Networks into Aria Automation Linux MacOS Networking PowerCLI Professional Development Scripting Swift TechBITS Tech Learning Update Manager VCSA VMUG VMware VMware Cloud on AWS VMware Portal VMware Tools VMworld vSphere vToolBelt Windows 10

Archives

Category

Aria Automation Aria Operations for Logs Before I Forget Certificates Education Home Lab Horizon View Importing vSphere Networks into Aria Automation Linux MacOS Networking PowerCLI Professional Development Scripting Swift TechBITS Tech Learning Update Manager VCSA VMUG VMware VMware Cloud on AWS VMware Portal VMware Tools VMworld vSphere vToolBelt Windows 10
Proudly powered by WordPress | Theme: Showme by NEThemes.
 

Loading Comments...