davidjumani commented on a change in pull request #4662:
URL: https://github.com/apache/cloudstack/pull/4662#discussion_r679629433
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java
##########
@@ -2906,7 +2905,10 @@ private void tearDownVm(VirtualMachineMO vmMo) throws
Exception {
int getReservedMemoryMb(VirtualMachineTO vmSpec) {
if
(vmSpec.getDetails().get(VMwareGuru.VmwareReserveMemory.key()).equalsIgnoreCase("true"))
{
- return (int) (vmSpec.getMinRam() / ResourceType.bytesToMiB);
+ if(vmSpec.getDetails().get(VmDetailConstants.RAM_RESERVATION) !=
null){
+ float reservedMemory = (vmSpec.getMaxRam() *
Float.parseFloat(vmSpec.getDetails().get(VmDetailConstants.RAM_RESERVATION)));
+ return (int) (reservedMemory / ResourceType.bytesToMiB);
+ }
Review comment:
```suggestion
}
return (int) (vmSpec.getMinRam() / ResourceType.bytesToMiB);
```
By default reserve all memory
--
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]