diff --git a/src/api/vm.coffee b/src/api/vm.coffee index d1107c877..f2f9a1a50 100644 --- a/src/api/vm.coffee +++ b/src/api/vm.coffee @@ -455,6 +455,9 @@ set = $coroutine (params) -> yield xapi.call 'VM.set_VCPUs_max', ref, "#{CPUs}" yield xapi.call 'VM.set_VCPUs_at_startup', ref, "#{CPUs}" + if 'cpusMax' of params + yield xapi.call 'VM.set_VCPUs_max', ref, "#{CPUs}" + # HA policy # TODO: also handle "best-effort" case if 'high_availability' of params @@ -509,6 +512,8 @@ set.params = { # Number of virtual CPUs to allocate. CPUs: { type: 'integer', optional: true } + cpusMax: { type: ['integer', 'string'], optional: true } + # Memory to allocate (in bytes). # # Note: static_min ≤ dynamic_min ≤ dynamic_max ≤ static_max