api.vm: Set vcpus max.

This commit is contained in:
wescoeur 2016-04-06 17:32:51 +02:00
parent 90f0795416
commit d82861727d

View File

@ -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