api.vm: Set vcpus max.
This commit is contained in:
parent
90f0795416
commit
d82861727d
@ -455,6 +455,9 @@ set = $coroutine (params) ->
|
|||||||
yield xapi.call 'VM.set_VCPUs_max', ref, "#{CPUs}"
|
yield xapi.call 'VM.set_VCPUs_max', ref, "#{CPUs}"
|
||||||
yield xapi.call 'VM.set_VCPUs_at_startup', 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
|
# HA policy
|
||||||
# TODO: also handle "best-effort" case
|
# TODO: also handle "best-effort" case
|
||||||
if 'high_availability' of params
|
if 'high_availability' of params
|
||||||
@ -509,6 +512,8 @@ set.params = {
|
|||||||
# Number of virtual CPUs to allocate.
|
# Number of virtual CPUs to allocate.
|
||||||
CPUs: { type: 'integer', optional: true }
|
CPUs: { type: 'integer', optional: true }
|
||||||
|
|
||||||
|
cpusMax: { type: ['integer', 'string'], optional: true }
|
||||||
|
|
||||||
# Memory to allocate (in bytes).
|
# Memory to allocate (in bytes).
|
||||||
#
|
#
|
||||||
# Note: static_min ≤ dynamic_min ≤ dynamic_max ≤ static_max
|
# Note: static_min ≤ dynamic_min ≤ dynamic_max ≤ static_max
|
||||||
|
Loading…
Reference in New Issue
Block a user