Skip to content

Commit 5b419b9

Browse files
authored
vmware: use hotPlugMemoryIncrementSize only for valid value (#4348)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
1 parent 40724e6 commit 5b419b9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource

plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ protected ScaleVmAnswer execute(ScaleVmCommand cmd) {
16341634
}
16351635

16361636
// Check increment is multiple of increment size
1637-
long reminder = requestedMaxMemoryInMb % hotaddIncrementSizeInMb;
1637+
long reminder = hotaddIncrementSizeInMb > 0 ? requestedMaxMemoryInMb % hotaddIncrementSizeInMb : 0;
16381638
if (reminder != 0) {
16391639
requestedMaxMemoryInMb = requestedMaxMemoryInMb + hotaddIncrementSizeInMb - reminder;
16401640
}

0 commit comments

Comments
 (0)