Skip to content

Commit

Permalink
fix(xapi/VM_destroy): use callAsync when appropriate
Browse files Browse the repository at this point in the history
Related to zammad#32397
  • Loading branch information
julien-f committed Dec 11, 2024
1 parent 02b067e commit 1bc0f8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions @xen-orchestra/xapi/vm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ class Vm {
// It is necessary for suspended VMs to be shut down
// to be able to delete their VDIs.
if (vm.power_state !== 'Halted') {
await this.call('VM.hard_shutdown', vmRef)
await this.callAsync('VM.hard_shutdown', vmRef)
}

await Promise.all([
Expand All @@ -480,7 +480,7 @@ class Vm {

// this cannot be done in parallel, otherwise disks and snapshots will be
// destroyed even if this fails
await this.call('VM.destroy', vmRef)
await this.callAsync('VM.destroy', vmRef)

await Promise.all([
asyncMap(vm.snapshots, snapshotRef =>
Expand Down

0 comments on commit 1bc0f8f

Please sign in to comment.