Creating a vTPM using New-VTpm to a virtual machine cloned from a template using New-VM fails with the error: "Number of virtual devices exceeds the maximum for a given controller".
In vpxd.log located in directory /var/log/vmware/vpxd, you see entries similar to a error "Too Many Devices", as shown below.
YYYY-MM-DDThh:mm:ss.fff+hh:mm info vpxd[54816] [Originator@6876 sub=VmProv opID=d38bde1-01] Applying ConfigSpec (vim.vm.ConfigSpec) {
--> createDate = "YYYY-MM-DDThh:mm:ss.fffffZ",
--> deviceChange = (vim.vm.device.VirtualDeviceSpec) [
--> (vim.vm.device.VirtualDeviceSpec) {
--> operation = "add",
--> device = (vim.vm.device.VirtualTPM) {
--> key = 0,
--> },
--> }
--> ],
--> memoryReservationLockedToMax = true,
--> } to VM ds:///vmfs/volumes/Datastore/VM-name/VM-name.vmx on host ###.###.###.###
YYYY-MM-DDThh:mm:ss.fff+hh:mm error vpxd[54816] [Originator@6876 sub=VmProv opID=d38bde1-01] Get exception while executing action vpx.vmprov.ReconfigureVm: N3Vim5Fault14TooManyDevices9ExceptionE(Fault cause: vim.fault.TooManyDevices
--> )
--> [context]zKq7AVECAQAAAKlaeQEodnB4ZAAAwuo3bGlidm1hY29yZS5zbwAAWYosANd9LQDf+jKB88IHAWxpYnZpbS10eXBlcy5zbwCBndMHAYFDLQgBgRdcCAEB74vrArdfc3ZweGQAguP3aQGCYvxpAYIp0jQBgqY4OQGCMkk2AYJsnTUBgr27NQGC28E1AYIlAGoBgmYBagGClBBqAYL3PWkBgsaWaQGC0u4zAYJz7zMBAl5P/QJzUv0C8lL9gVf0BQGCKv1qAYIlAGoBgmYBagGClBBqAYL3PWkBgsLnaQEAp1ojADWwIwCAdjcDh38AbGlicHRocmVhZC5zby4wAAT/Nw9saWJjLnNvLjYA[/context]
VMware vCenter Server 7.0.x
VMware ESXi 7.0.x
PowerCLI
A vTPM has already been created to a cloned virtual machine.
Since the maximum number of vTPMs that can be create to a virtual machine is 1, attempting to add a vTPM using New-VTpm will result in an error if one is already present.
If a vTPM has already been created to the cloned virtual machine, do not create a vTPM using New-VTpm.
Verify whether a vTPM has been create to the virtual machine using the following section.
-----
vSphere Client -> Inventory -> VM -> Edit Settings -> Security Devices (TPM)
-----
Japanese Version:
クローンした仮想マシンで New-VTpm による vTPM の作成が「仮想デバイス数が指定したコントローラの上限を超えています。」で失敗する
New-VM
https://developer.broadcom.com/powercli/latest/vmware.vimautomation.core/commands/new-vm
New-VTpm
https://developer.broadcom.com/powercli/latest/vmware.vimautomation.security/commands/new-vtpm?scrollString=New-VTpm