VMware Cloud Foundation Bringup With Signed Certs on ESXi Hosts

Traditionally VMware Cloud Foundation (VCF) has followed the hybrid approach when it comes to SSL certificate management. Hybrid mode essentially means using CA signed certs for the vCenter Server machineSSL cert, and VMCA signed certs for the solution user certs. In this mode, ESXi host certs are VMCA managed also. You then have the option to integrate with an external Microsoft CA or continue to use VMCA for all certs. If you decide to integrate with a Microsoft CA, ESXi host certs remain VMCA managed. This is not always ideal as some customers require all components on the network to be signed by a known & trusted CA. Up until the recent 4.1 VMware Cloud Foundation (VCF) release it was not possible to use custom CA signed certs on your ESXi hosts, as hybrid mode would overwrite your CA signed ESXi certs with VMCA signed certs. There is a great blog post here on how to manually enable CA signed certs here but with VCF 4.1 it is now supported to do this via the API during bringup. The procedure is as follows:

 

  1. Install the ESXi hosts that will be used for bringup with the ESXi version on the Bill Of Materials for 4.1
  2. Install your custom CA signed certs on each host that will be used for the management domain
    1. Log in to the ESXi Shell, either directly from the DCUI or from an SSH client, as a user with administrator privileges.
    2. In the directory /etc/vmware/ssl, rename the existing certificates using the following commands.

1

2

mv rui.crt orig.rui.crt

mv rui.key orig.rui.key

  1. Copy the certificates that you want to use to /etc/vmware/ssl.
  2. Rename the new certificate and key to rui.crt and rui.key.
  3. Restart the host management agents by running the following commands

/etc/init.d/hostd restart /etc/init.d/vpxa restart

Repeat the above steps for all management domain hosts

To ensure that SDDC Manager is aware that you are using custom certs you need to add a flag in the bringup json along with the PEM encoded signing chain certificate, so that it is added to the SDDC Manager keystore. This will ensure the certificates are trusted. The API guide for 4.1 provides an example json spec here. Pay particular attention to this section

1

2

3

4

5

6

7

securitySpec" : {

"esxiCertsMode" : "One among:Custom, VMCA",

"rootCaCerts" : [ {

"alias" : "string",

"certChain" : [ "string" ]

} ]

}

So to enable support for signed certs you would set this section as follows (Substituting your signing CA chain)

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

securitySpec" : {

"esxiCertsMode" : "Custom",

"rootCaCerts" : [ {

"al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fIHbPS5KJwJibbPe

w9UuNRdcxN9hFWKBC0SvfgX+1CJxVdvgfi65rSHPuWinJzrXXdH999DfpDESRzwH

0pqE3GtMCt1Nqalp2QJFdahbT+kxj7QWHTjUylSENDHjdln7a8WH8RGxvEy/97YZ

+crXmxvQ/bAgHk9vcRERbRjfyIs7v88=

-----END CERTIFICATE-----" ] } ] }

 

You can then follow the steps outlined in the API guide to deploy the management domain using the Cloud Builder API. Note that once custom mode is enabled, all future workload domains that you create must also use signed certs.

 

About the Author:

Brian O’Connell is a Staff Engineer, part of the VMware Validated Design Solution Architecture team in the Cloud Platform Business Unit at VMware. This team is responsible for VMware Validated Design, and VMware Cloud Foundation solution architecture design and content creation.  You can find Brian blogging at: https://lifeofbrianoc.com and on Twitter @LifeOfBrianOC

This article was originally posted here, and has been reposted with permission from the author.

Filter Tags

Cloud Foundation VCF Operational Guidance Deploy