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/03 11:34:49 UTC

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

harikrishna-patnala commented on a change in pull request #4630:
URL: https://github.com/apache/cloudstack/pull/4630#discussion_r569340333



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

Review comment:
       Thanks @DK101010, this seems to be good.
   I'm also thinking, if memory hot add memory and CPU are not supported by OS and vmSpec wants the VM to be dynamically scalable, may be we should atleast log it saying this is not supported by OS. Can you please do that here.

##########
File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VmwareVmImplementer.java
##########
@@ -139,6 +140,10 @@ VirtualMachineTO implement(VirtualMachineProfile vm, VirtualMachineTO to, long c
                     details.put(VmDetailConstants.NIC_ADAPTER, VirtualEthernetCardType.E1000.toString());
                 }
             }
+            if(vm.getVirtualMachine() instanceof VMInstanceVO){
+                VMInstanceVO vmInstanceVO =(VMInstanceVO) vm.getVirtualMachine();
+                to.setEnableDynamicallyScaleVm(vmInstanceVO.isDynamicallyScalable());

Review comment:
       HypervisorGuruBase is already setting this paramter in toVirtualMachineTO(), can you please double check if this is necessary or redundant in VmwareVMImplementer.
           to.setEnableDynamicallyScaleVm(isDynamicallyScalable);




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