fix(vm): always consider memory dynamic max when updating resource set

This commit is contained in:
Julien Fontanet 2016-05-24 16:22:55 +02:00
parent f9109edcf1
commit fc86a3e882

View File

@ -72,7 +72,7 @@ create = $coroutine ({
limits = {
cpus: template.CPUs.number,
disk: 0,
memory: template.memory.size,
memory: template.memory.dynamic[1],
vms: 1
}
objectIds = [
@ -449,7 +449,7 @@ set = $coroutine (params) ->
if resourceSet?
yield @allocateLimitsInResourceSet({
memory: memory - VM.memory.size
memory: memory - VM.memory.dynamic[1]
}, resourceSet)
yield xapi.call 'VM.set_memory_dynamic_max', ref, "#{memory}"