From f9109edcf11180738b7632c1ec80431e2c949a40 Mon Sep 17 00:00:00 2001 From: Julien Fontanet Date: Tue, 24 May 2016 16:21:21 +0200 Subject: [PATCH] fix(vm.set): memoryMax should update resource set --- src/api/vm.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/api/vm.coffee b/src/api/vm.coffee index 5d25d4b9f..9a28293b3 100644 --- a/src/api/vm.coffee +++ b/src/api/vm.coffee @@ -415,6 +415,10 @@ set = $coroutine (params) -> memoryMax = parseSize(params.memoryMax) if memoryMax > VM.memory.static[1] yield xapi.call 'VM.set_memory_static_max', memoryMax + if resourceSet? + yield @allocateLimitsInResourceSet({ + memory: memory - VM.memory.dynamic[1] + }, resourceSet) yield xapi.call 'VM.set_memory_dynamic_max', ref, "#{memoryMax}" if 'memoryStaticMax' of params memoryStaticMax = parseSize(params.memoryStaticMax)