feat(vm.start): resume VM if suspended (#639)

This commit is contained in:
Olivier Lambert 2018-01-02 16:47:42 +01:00 committed by Julien Fontanet
parent 0bcabb9f0d
commit 041c32a4a7

View File

@ -1456,7 +1456,9 @@ export default class Xapi extends XapiBase {
if (e.code === 'OPERATION_BLOCKED') {
throw forbiddenOperation('Start', e.params[1])
}
if (e.code === 'VM_BAD_POWER_STATE') {
return this.resumeVm(vmId)
}
throw e
}
}