CA-225708: Can not increase dom0 Memory multiple times

- take the already assigned dom0 memory into account when calculating maximum memory available

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
Mihaela Stoica 2016-10-17 14:23:50 +01:00
parent 2bf2f4fcf0
commit 18243b229f

View File

@ -85,7 +85,7 @@ namespace XenAdmin.Dialogs
vm.memory_static_max >= vm.memory_static_min)
{
double min = vm.memory_static_min;
double max = Math.Min(host.memory_available_calc, MAXIMUM_DOM0_MEMORY_GB * Util.BINARY_GIGA);
double max = Math.Min(vm.memory_dynamic_min + host.memory_available_calc, MAXIMUM_DOM0_MEMORY_GB * Util.BINARY_GIGA);
double value = vm.memory_dynamic_min;
// Avoid setting the range to exclude the current value: CA-40041
if (value > max)