Securing virtual environments is essential for organisations managing sensitive data. VMware vSphere built-in Native Key Provider, is an embedded Embedded Key Management Server (KMS), providing a robust and straightforward solution for encrypting virtual machines (VMs). This eliminates the need for an external KMS while enabling advanced security features such as VM Encryption and vSAN Encryption, streamlining the process for VMware administrators.
In this blog post, I’ll guide you through the process of setting up vCenter’s Native Key Provider, enabling VM encryption, and validating its effectiveness in protecting encrypted virtual disks. Along the way, we’ll also cover best practices, including backing up the Native Key Provider to ensure resilience in your virtualisation environment.
Important Considerations for leveraging the Native Key Provider to Encrypt VMs
Before diving into encryption setup, it’s crucial to understand the role of vCenter in managing encrypted VMs. If vCenter is lost or becomes inaccessible, the encrypted VMs will remain secure but unusable until the key management functionality is restored. Here’s why:
- Dependency on Encryption Keys: vCenter manages the encryption keys through the embedded KMS. If the keys are lost, the encrypted VMs cannot be decrypted.
- Restoring Access: To regain access to encrypted VMs, a backup of vCenter with the Embedded Key Provider configuration is required.
- Best Practices:
- Regularly back up vCenter, including the Embedded Key Provider configuration.
- Store backups securely in a location separate from the primary data center.
- Document recovery procedures to ensure quick restoration in case of failure.
By implementing these precautions, you can mitigate risks and maintain operational continuity in your virtual environment.
Step 1: Set Up the vCenter Native Key Provider
- Log in to the vSphere Client.
- Navigate to vCenter Server > Configure > Key Providers.
- Click Add Key Provider, and choose Native Key Provider.

- Provide a friendly name for the Native Key Provider. If you have TPM-protected ESXi hosts, it is recommended to check the option to only use the key provider with TPM-protected ESXi hosts.
- Press Add Key Provider to complete the setup.

- You should now see the newly created provider. Notice that the status is shown as “Not Backed Up.”

Step 2: Back Up the Native Key Provider
- After creating the Native Key Provider, navigate to the Key Providers page in the vSphere Client.
- Locate the newly created key provider, which will have a status of Not Backed Up.
- Click the Back Up Key Provider button.

- Select the option to password protect the backup.
- Save the backup file to a secure and accessible location.
- Once backed up, verify the status of the key provider changes to Backed Up.


Step 3: Encrypt a Virtual Machine
- Select an existing VM or create a new one in the vSphere Client.
- Right-click the VM and choose Edit Settings.
- Scroll to the VM Options tab.
- Locate the Encryption section and select Enable Encryption.
- Choose the Native Key Provider as the encryption key provider.
- Then, select VM Encryption Policy as the storage policy for the virtual machine.
- Save the settings to apply encryption to the VM. This will encrypt the virtual disk; the time taken will depend on the size of the disk.

- On the summary page of the VM, you can confirm that the Virtual Machine has been successfully encrypted. The page also displays the key provider in use for encryption.

Step 4: Validate Encrypted Disk Cannot Be Added to Another VM
This step demonstrates the security enforcement of VM encryption. It shows that an encrypted disk cannot be added to another VM, ensuring that encrypted data remains protected and inaccessible outside its original configuration.
- On another VM, navigate to Edit Settings.
- Choose Add Existing Disk.
- Browse to locate the disk of the encrypted VM.

- Attempt to add the encrypted disk to the other VM.

- Observe the error message indicating that the encrypted disk cannot be added.
- The process will not allow you to proceed with adding the encrypted disk to the VM.

Conclusion
Setting up VM encryption with the vCenter Native Key Provider is a simple and seamless process, yet it delivers a robust solution for securing enterprise data. This integration ensures sensitive information remains protected while maintaining ease of implementation.
Thank you for reading! I hope you found this guide informative. If you have any questions or insights, feel free to drop a comment below!