Merge pull request #256 from vatesfr/fix-vm-recoveryStart

Xapi#startVmOnCd(): fix for HVM (fix vatesfr/xo-web#794).
This commit is contained in:
Olivier Lambert 2016-03-03 10:10:10 +01:00
commit 6953f65970

View File

@ -1721,17 +1721,17 @@ export default class Xapi extends XapiBase {
const vm = this.getObject(vmId)
if (isVmHvm(vm)) {
const bootOrder = vm.HVM_boot_params
const { order } = vm.HVM_boot_params
await this._setObjectProperties(vm, {
HVM_boot_params: 'd'
await this._updateObjectMapProperty(vm, 'HVM_boot_params', {
order: 'd'
})
try {
await this._startVm(vm)
} finally {
await this._setObjectProperties(vm, {
HVM_boot_params: bootOrder
await this._updateObjectMapProperty(vm, 'HVM_boot_params', {
order
})
}
} else {