sureshanaparti commented on code in PR #10543:
URL: https://github.com/apache/cloudstack/pull/10543#discussion_r2003222632
##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java:
##########
@@ -3203,6 +3209,57 @@ protected void
configureSpecVideoCardNewVRamSize(VirtualMachineVideoCard videoCa
vmConfigSpec.getDeviceChange().add(arrayVideoCardConfigSpecs);
}
+ /**
+ * Add or Remove virtual TPM module
+ *
+ * @param vmMo virtual machine mo
+ * @param vmSpec virtual machine specs
+ * @param vmConfigSpec virtual machine config spec
+ * @throws Exception exception
+ */
+ protected void configureVirtualTPM(VirtualMachineMO vmMo, VirtualMachineTO
vmSpec, VirtualMachineConfigSpec vmConfigSpec) throws Exception {
+ String virtualTPMEnabled =
vmSpec.getDetails().getOrDefault(VmDetailConstants.VIRTUAL_TPM_ENABLED, null);
+ if (Boolean.parseBoolean(virtualTPMEnabled)) {
+ for (VirtualDevice device : vmMo.getAllDeviceList()) {
+ if (device instanceof VirtualTPM) {
+ logger.debug(String.format("Virtual TPM device has already
been added to VM , returning", vmMo.getVmName()));
Review Comment:
```suggestion
logger.debug(String.format("Virtual TPM device has
already been added to VM %s, returning", vmMo.getVmName()));
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]