Since we will be allowing users to set device aliases and memory
devices are fragile when it comes to aliases we have to make sure
they won't change during migration. Other devices should be fine.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/qemu/qemu_domain.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
index ece8ee7dd..3b94db99f 100644
--- a/src/qemu/qemu_domain.c
+++ b/src/qemu/qemu_domain.c
@@ -6428,6 +6428,8 @@ static bool
qemuDomainABIStabilityCheck(const virDomainDef *src,
const virDomainDef *dst)
{
+ size_t i;
+
if (src->mem.source != dst->mem.source) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("Target memoryBacking source '%s' doesn't
"
@@ -6437,6 +6439,19 @@ qemuDomainABIStabilityCheck(const virDomainDef *src,
return false;
}
+ for (i = 0; i < src->nmems; i++) {
+ const char *srcAlias = src->mems[i]->info.alias;
+ const char *dstAlias = dst->mems[i]->info.alias;
+
+ if (STRNEQ_NULLABLE(srcAlias, dstAlias)) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target memory device alias '%s' doesn't
"
+ "match source alias '%s'"),
+ NULLSTR(srcAlias), NULLSTR(dstAlias));
+ return false;
+ }
+ }
+
return true;
}
--
2.13.6