add PV args for VM

This commit is contained in:
Olivier Lambert 2015-09-17 16:14:30 +02:00
parent 2462f8f87e
commit b3ca02a166
3 changed files with 8 additions and 0 deletions

View File

@ -40,6 +40,7 @@ create = $coroutine ({
name_description
name_label
template
pv_args
VDIs
VIFs
}) ->
@ -47,6 +48,7 @@ create = $coroutine ({
installRepository: installation && installation.repository,
nameDescription: name_description,
nameLabel: name_label,
pvArgs: pv_args,
vdis: VDIs,
vifs: VIFs
})
@ -69,6 +71,9 @@ create.params = {
name_label: { type: 'string' }
name_description: { type: 'string', optional: true }
# PV Args
pv_args: { type: 'string', optional: true }
# TODO: add the install repository!
# VBD.insert/eject
# Also for the console!

View File

@ -223,6 +223,7 @@ export function vm (obj) {
other: otherConfig,
os_version: guestMetrics && guestMetrics.os_version || null,
power_state: obj.power_state,
PV_args: obj.PV_args,
PV_drivers: Boolean(guestMetrics),
PV_drivers_up_to_date: Boolean(guestMetrics && guestMetrics.PV_drivers_up_to_date),
snapshot_time: toTimestamp(obj.snapshot_time),

View File

@ -470,6 +470,7 @@ export default class Xapi extends XapiBase {
async createVm (templateId, {
nameDescription = undefined,
nameLabel = undefined,
pvArgs = undefined,
cpus = undefined,
installRepository = undefined,
vdis = [],
@ -508,6 +509,7 @@ export default class Xapi extends XapiBase {
// Set VMs params.
this._setObjectProperties(vm, {
nameDescription,
PV_args: pvArgs,
VCPUs_at_startup: cpus
})