Migrations of S390 domains from hosts with QEMU supporting ACPI and a
libvirt version prior 9.1.0 fail when the destination host runs a QEMU
not supporting ACPI and a libvirt version 9.1.0 or older. Actually S390
never supported ACPI but domains were allowed to have the feature ACPI
enabled and it was silently tolerated. To allow migration from libvirt
versions prior 9.1.0 which allowed the ACPI feature to be used on S390
tolerate ACPI by setting it to absent if specified and QEMU does not
support it.
Resolves:
https://issues.redhat.com/browse/RHEL-49516
Signed-off-by: Boris Fiuczynski <fiuczy(a)linux.ibm.com>
---
src/qemu/qemu_domain.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index 198ab99aef..fbc336ac66 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -4499,6 +4499,16 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def,
* capabilities, we still want to enable this */
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
}
+
+ /* To support migration from libvirt versions prio 9.1.0 which allowed
+ * the ACPI feature to be used on S390 tolerate ACPI by setting it to
+ * absent if specified and QEMU does not support it */
+ if (ARCH_IS_S390(def->os.arch) &&
+ def->features[VIR_DOMAIN_FEATURE_ACPI] != VIR_TRISTATE_SWITCH_ABSENT
&&
+ virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.machine) ==
VIR_TRISTATE_BOOL_NO) {
+ VIR_DEBUG("Tolerate ACPI on S390 by removing the ACPI feature");
+ def->features[VIR_DOMAIN_FEATURE_ACPI] = VIR_TRISTATE_SWITCH_ABSENT;
+ }
}
--
2.45.0