From 041c32a4a730743e13d5b9b23384e7d6c6f5be2a Mon Sep 17 00:00:00 2001 From: Olivier Lambert Date: Tue, 2 Jan 2018 16:47:42 +0100 Subject: [PATCH] feat(vm.start): resume VM if suspended (#639) --- src/xapi/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/xapi/index.js b/src/xapi/index.js index 21554e026..0859cbef7 100644 --- a/src/xapi/index.js +++ b/src/xapi/index.js @@ -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 } }