You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/02/01 09:34:33 UTC

[GitHub] [cloudstack] DaanHoogland commented on a change in pull request #4630: disable hot add memory and cpu via vm settings

DaanHoogland commented on a change in pull request #4630:
URL: https://github.com/apache/cloudstack/pull/4630#discussion_r567678690



##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -1959,15 +1959,15 @@ protected StartAnswer execute(StartCommand cmd) {
             }
 
             // Check for hotadd settings
-            vmConfigSpec.setMemoryHotAddEnabled(vmMo.isMemoryHotAddSupported(guestOsId));
+            vmConfigSpec.setMemoryHotAddEnabled(vmMo.isMemoryHotAddSupported(guestOsId) && Boolean.parseBoolean(vmSpec.getDetails().get(VmDetailConstants.HOT_ADD_MEMORY)));

Review comment:
       @DK101010, I probably don't understand but the `vmMo` is found on the hypervisor with `vmMo = hyperHost.findVmOnHyperHost(vmInternalCSName);`, if it was already created. And if on creation `memoryHotAddEnabled` was set to false, the above will always be false on the next start, and hence all subsequent. Maybe this is not in the functional intent of this PR but it seems when you turn it off for a VM it will not be turned on again if the user switches it on again.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org