vSphere VMs encryption: KMS Server installation - pt.1

virtual-machines-encryption-kms-install-01

To improve security in a virtual environment, VMware vSphere 6.5 provides the virtual machines encryption capability securing VMDK virtual disks, .vmx and swap files making stored data unreadable.

Only the virtual machine that manages the VMDK disks owns the key used to encrypt. If you try to access the encrypted VMDK from an unauthorized VM, you only get unreadable data.

virtual-machines-encryption-kms-install-02

No additional hardware is required to encrypt and decrypt a virtual machine and the used processor should support AES-NI instructions set, enabled in the BIOS, to improve performance since encryption is a CPU intensive process.

 

Blog series

vSphere VMs encryption: KMS Server installation - pt.1
vSphere VMs encryption: setup vCenter Server - pt.2
vSphere VMs encryption: encrypt virtual machines - pt.3

 

Required components

To encrypt virtual machines, the vCenter Server must be connected to a Key Management Server (KMS) to get the necessary keys to encrypt and decrypt the VMs using the KMIP protocol. KMS performs a certificate exchange to establish the connection with the vCenter Server.

Two components are required to perform virtual machines encryption:

  • KMS Server - used to generate and store the keys passed to the vCenter Server. KMS instances added to the same KMS cluster configured in the vCenter Server must be from the same vendor (for example HyTrust, CloudLink, and IBM). You can use different vendors in different environments by creating a KMS cluster for each KMS specifying the default cluster (by default the first cluster added).
  • vCenter Server - establishes a connection to the KMS Server to obtain the keys to be assigned to ESXi hosts keeping only the list of key IDs (no keys are stored in the vCenter Server).

 

Install the KMS Server

In this example, the KMS Server by HyTrust will be used. Download the KMS Server as .OVA file from the HyTrust website.

virtual-machines-encryption-kms-install-03

Open the vSphere Web Client, right click the cluster o resource pool to install the KMS Server and select Deploy OVF Template.

virtual-machines-encryption-kms-install-04

Click on Browse and select the downloaded file then click Next.

virtual-machines-encryption-kms-install-05

Type a Name and specify the deployment location. Click Next.

virtual-machines-encryption-kms-install-06

Select the resource to install the virtual machine then click Next.

virtual-machines-encryption-kms-install-07

In the Review Details a warning informs you about the Extra configuration added. Click Next.

virtual-machines-encryption-kms-install-08

Leave Recommended as Configuration value and click Next.

virtual-machines-encryption-kms-install-09

Specify the disk format and the datastore to use. Click Next to continue.

virtual-machines-encryption-kms-install-10

Specify the network to use by selecting the correct value from the Destination Network drop-down menu. Click Next.

virtual-machines-encryption-kms-install-11

Enter the request network parameters then click Next.

virtual-machines-encryption-kms-install-12

Click Finish to proceed with the deployment.

virtual-machines-encryption-kms-install-13

When the deployment process has completed, right click the virtual machine and select Power > Power on. When the virtual machine is up and running, access the console from the vCenter Server.

virtual-machines-encryption-kms-install-14

 

Configure the KMS Server

From the virtual machine's console, enter a new password and click OK.

virtual-machines-encryption-kms-install-15

Click No since this is the first KeyControl cluster.

virtual-machines-encryption-kms-install-16

The installation has been completed. To finalize the setup, you have to access the webGUI at the address specified. Click OK.

virtual-machines-encryption-kms-install-17

The KMS Server system configuration is displayed. No further actions are requested from the console then you can Log Out.

virtual-machines-encryption-kms-install-18

Open the preferred browser and type the address https://IP_address_KMS and enter the default credentials. Click Sign-in.

Username: secroot
Password: secroot

virtual-machines-encryption-kms-install-19

Accept the EULA by clicking on I agree button.

virtual-machines-encryption-kms-install-20

Enter a new password for the secroot account and click Update Password.

virtual-machines-encryption-kms-install-21

Optionally you can configure the email setting to receive the alerts or disable e-mail notifications.

virtual-machines-encryption-kms-install-22

The main dashboard is displayed. Click KMIP from the main menu.

virtual-machines-encryption-kms-install-23

The KMIP must be enabled. From the State drop-down menu select ENABLED and click Apply.

virtual-machines-encryption-kms-install-24

Select the Users tab then click on Action. Select Create User.

virtual-machines-encryption-kms-install-25

Specify the Username and Cert Expiration then click CreateDo not enter a password for the certificates. Due to a vSphere limitation, you cannot upload encrypted certificates.

virtual-machines-encryption-kms-install-26

The user has been created successfully.

virtual-machines-encryption-kms-install-27

Select the just created user and click on Action > Download Certificate.

virtual-machines-encryption-kms-install-28

The certificate in .ZIP format is downloaded to the local computer and contains a user certification/key file called username.pem (VCSA.pem in the example) and a server certification file called cacert.pem.

virtual-machines-encryption-kms-install-29

The KMS Server configuration is now complete and the certificate has been created. Part 2 will cover the configuration of the vCenter Server.

signature

2 Comments

  1. Mitzi Rodriguez 21/06/2019