diff --git a/@xen-orchestra/xapi/host.mjs b/@xen-orchestra/xapi/host.mjs index b96544741e..657f1c871c 100644 --- a/@xen-orchestra/xapi/host.mjs +++ b/@xen-orchestra/xapi/host.mjs @@ -48,14 +48,16 @@ class Host { // check the VMs with PCI passthrough const vms = await asyncMap(residentVmRefs, ref => this.getRecord('VM', ref)) - const vmsNotSuspendable = vms.filter(async vm => { + const vmsNotSuspendable = [] + + await asyncEach(vms, async vm => { try { await this.call('VM.assert_operation_valid', vm.$ref, 'suspend') - return false } catch (err) { - return true + vmsNotSuspendable.push(vm) } }) + const vmsNotSuspendableRefs = new Set(vmsNotSuspendable.map(vm => vm.$ref)) const vmsWithSuspendBlocked = await asyncMap(residentVmRefs, ref => this.getRecord('VM', ref)).filter( diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 0a97c34954..44e2b0a62f 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -30,6 +30,7 @@ - [XO6] Fix the VM's VDI tab, which sometimes displays an error (PR [#10156](https://github.com/vatesfr/xen-orchestra/pull/10156)) - [XO6] Reduce the number of HTTP requests when navigating between pages (PR [#10156](https://github.com/vatesfr/xen-orchestra/pull/10156)) - [Backups] Don't hide errors during transfers (PR [#10183](https://github.com/vatesfr/xen-orchestra/pull/10183)) +- [Smart reboot] Fix `suspendBlocked` error when no issue to suspend resident VMs (PR [#10180](https://github.com/vatesfr/xen-orchestra/pull/10180)) ### Packages to release @@ -54,6 +55,7 @@ - @xen-orchestra/rest-api minor - @xen-orchestra/web minor - @xen-orchestra/web-core minor +- @xen-orchestra/xapi patch - xo-server minor - xo-server-openmetrics minor - xo-web minor