vm.create() only one VBD is bootable.

This commit is contained in:
Julien Fontanet 2015-06-18 16:10:32 +02:00
parent 0abfb9f1e4
commit f393c7173c
2 changed files with 2 additions and 7 deletions

View File

@ -93,7 +93,6 @@ create.params = {
items: {
type: 'object'
properties: {
bootable: { type: 'boolean' }
device: { type: 'string' }
size: { type: 'integer' }
SR: { type: 'string' }

View File

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