mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
vmware: use hotPlugMemoryIncrementSize only for valid value (#4348)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
This commit is contained in:
parent
40724e66e8
commit
5b419b90d0
@ -1634,7 +1634,7 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
}
|
||||
|
||||
// Check increment is multiple of increment size
|
||||
long reminder = requestedMaxMemoryInMb % hotaddIncrementSizeInMb;
|
||||
long reminder = hotaddIncrementSizeInMb > 0 ? requestedMaxMemoryInMb % hotaddIncrementSizeInMb : 0;
|
||||
if (reminder != 0) {
|
||||
requestedMaxMemoryInMb = requestedMaxMemoryInMb + hotaddIncrementSizeInMb - reminder;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user