WilliamLam.com

  • About
    • About
    • Privacy
  • VMware Cloud Foundation
  • VKS
  • Homelab
    • Resources
    • Nested Virtualization
  • VMware Nostalgia
  • Apple
You are here: Home / ESXi / Quick Tip - Adding a vTPM (Virtual Trusted Platform Module) to a Nested ESXi VM

Quick Tip - Adding a vTPM (Virtual Trusted Platform Module) to a Nested ESXi VM

05.13.2022 by William Lam // 3 Comments

I had an interesting question this morning asking whether it was possible to add a vTPM (Virtual Trusted Platform Module) to a Nested ESXi VM? The user was interested in testing a particular scenario with the new vSphere Trust Authority feature that was introduced in the vSphere 7.0. I personally had not done much with vTPM and I had assumed it should just work as long as you have a physical TPM chip in the underlying hardware and you have setup either a Standard or Native Key Provider within your vCenter Server.

The user observed that adding a vTPM to a Windows VM was possible using the vSphere UI but when attempting to perform the same operation on a Nested ESXi VM, the option to add vTPM device was not available. After spending ~30 minutes asking around for hardware that had a physical TPM, I remember that my Quartz Canyon NUC (NUC 9 Pro) is a Xeon based system and it has TPM 2.0 chip. I was able to take a closer look and quickly found the solution was very pretty straight forward!

As most folks know, Nested ESXi and Nested Virtualization is not officially supported by VMware, so I suspect that the workflow for adding vTPM simply did not consider Nested ESXi as a valid GuestOS or blocked it by default within the vSphere UI. With that said, you can absolutely add vTPM to a Nested ESXi VM using the vSphere API and luckily, you can easily do this by using PowerCLI's New-VTpm cmdlet.

Here is the command which retrieves the desired Nested ESXi VM by name and then adds the vTPM device:

Get-VM "Nested_ESXi7.0u3c" | New-VTpm


Once the operation has completed, we can now navigate to the vSphere UI and we should now see a vTPM device has been added to our Nested ESXi VM


We can also confirm that the Nested ESXi VM can see vTPM device by running the following ESXCLI command:

esxcli hardware trustedboot get


Lastly, we can add our Nested ESXi to a vSphere Cluster and enable the vSphere Trust Authority state, which also requires the use of PowerCLI and we can now see that vSphere Trust Authority has been properly configured using a Nested ESXi VM and vTPM device!

More from my site

  • Quick Tip - Which vCenter Server Key Provider (KMS) is a VM using?
  • Enable TRIM/UNMAP from Nested vSAN OSA/ESA to physical vSAN OSA
  • vSAN ESA HCL hardware mock VIB for Nested ESXi
  • Easier method to simulate custom ESXi SMBIOS hardware strings
  • ESXi-Arm V2 Easter Egg

Categories // ESXi, Nested Virtualization, vSphere Tags // Nested ESXi, TPM, vTPM

Comments

  1. *protectedJoschua says

    05/17/2022 at 9:56 pm

    That would be a nice feature for a more secure version of the VSAN wittness node.

    Reply
  2. *protectedLordofVxRail says

    11/23/2022 at 5:01 am

    Hi William, to use New-VTpm, my understanding is that the (nested) cluster must already be deployed with a KMS added to VC?

    My use case is trying to use New-VTpm on appropriate nested ESXi, however proior to being added to a cluster in VC.

    eg:

    PS C:\scripts> get-vm "esx01-0baF" | New-VTpm
    New-VTpm: 11/23/2022 12:51:12 PM New-VTpm Server task failed: RuntimeFault.summary Cannot apply encryption policy. You must set the default key provider.
    PS C:\scripts>

    Reply
    • *protectedLordofVxRail says

      11/23/2022 at 5:26 am

      ah, please iognore my above reply

      "as long as you have a physical TPM chip in the underlying hardware and you have setup either a Standard or Native Key Provider within your vCenter Server"

      Reply

Leave a Reply to JoschuaCancel reply

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

Search

Thank Author

Author

William is Distinguished Platform Engineering Architect in the VMware Cloud Foundation (VCF) Division at Broadcom. His primary focus is helping customers and partners build, run and operate a modern Private Cloud using the VMware Cloud Foundation (VCF) platform.

Connect

  • Bluesky
  • Email
  • GitHub
  • LinkedIn
  • Mastodon
  • Reddit
  • RSS
  • Twitter
  • Vimeo

Recent

  • Programmatically accessing the Broadcom Compatibility Guide (BCG) 05/06/2025
  • Quick Tip - Validating Broadcom Download Token  05/01/2025
  • Supported chipsets for the USB Network Native Driver for ESXi Fling 04/23/2025
  • vCenter Identity Federation with Authelia 04/16/2025
  • vCenter Server Identity Federation with Kanidm 04/10/2025

Advertisment

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy

Copyright WilliamLam.com © 2025

 

Loading Comments...