diff --git a/src/api/vm.coffee b/src/api/vm.coffee index 8f623cfae..d0c93f6b0 100644 --- a/src/api/vm.coffee +++ b/src/api/vm.coffee @@ -93,7 +93,6 @@ create.params = { items: { type: 'object' properties: { - bootable: { type: 'boolean' } device: { type: 'string' } size: { type: 'integer' } SR: { type: 'string' } diff --git a/src/xapi.js b/src/xapi.js index 9d4eb1972..1da5960e3 100644 --- a/src/xapi.js +++ b/src/xapi.js @@ -517,7 +517,6 @@ export default class Xapi extends XapiBase { // TODO: set vm.suspend_SR { const {$default_SR: defaultSr} = this.pool - let position = 0 await Promise.all(map(vdis, (vdiDescription, i) => { return this._createVdi( this.getObject(vdiDescription.sr || vdiDescription.SR, defaultSr), @@ -529,11 +528,8 @@ export default class Xapi extends XapiBase { ) .then(ref => this._getOrWaitObject(ref)) .then(vdi => this._createVbd(vm, vdi, { - // TODO: should bootable be in the description or be - // deduced by the position in the array (i === 0)? - bootable: vdiDescription.bootable, - - position: position++ + // Only the first VBD if installMethod is not cd is bootable. + bootable: installMethod !== 'cd' && !i })) })) }