From: Marc-André Lureau <marcandre.lureau(a)redhat.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau(a)redhat.com>
---
src/qemu/qemu_migration.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index a11c6f1a9f..35fadfec44 100644
--- a/src/qemu/qemu_migration.c
+++ b/src/qemu/qemu_migration.c
@@ -39,6 +39,7 @@
#include "qemu_hotplug.h"
#include "qemu_blockjob.h"
#include "qemu_security.h"
+#include "qemu_slirp.h"
#include "qemu_block.h"
#include "domain_audit.h"
@@ -1146,7 +1147,17 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
_("cannot migrate domain with I/O error"));
return false;
}
+ }
+
+ for (i = 0; i < vm->def->nnets; i++) {
+ virDomainNetDefPtr net = vm->def->nets[i];
+ qemuSlirpPtr slirp = QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp;
+ if (slirp && !qemuSlirpHasFeature(slirp, QEMU_SLIRP_FEATURE_MIGRATE)) {
+ virReportError(VIR_ERR_OPERATION_INVALID, "%s",
+ _("a slirp-helper cannot be migrated"));
+ return false;
+ }
}
/* following checks don't make sense for offline migration */
--
2.22.0.214.g8dca754b1e