fix(Xapi#snapshotVm): fallback if quiesce failed
Fixes vatesfr/xo-web#1088
This commit is contained in:
parent
75cae8c647
commit
3263511b72
@ -1634,9 +1634,16 @@ export default class Xapi extends XapiBase {
|
|||||||
|
|
||||||
await this._waitObjectState(ref, vm => includes(vm.tags, 'quiesce'))
|
await this._waitObjectState(ref, vm => includes(vm.tags, 'quiesce'))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
const { code } = error
|
||||||
if (
|
if (
|
||||||
error.code !== 'VM_SNAPSHOT_WITH_QUIESCE_NOT_SUPPORTED' &&
|
code !== 'VM_SNAPSHOT_WITH_QUIESCE_NOT_SUPPORTED' &&
|
||||||
error.code !== 'VM_BAD_POWER_STATE' // quiesce only work on a running VM
|
|
||||||
|
// quiesce only work on a running VM
|
||||||
|
code !== 'VM_BAD_POWER_STATE' &&
|
||||||
|
|
||||||
|
// quiesce failed, fallback on standard snapshot
|
||||||
|
// TODO: emit warning
|
||||||
|
code !== 'VM_SNAPSHOT_WITH_QUIESCE_FAILED'
|
||||||
) {
|
) {
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user