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 | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
index 86b4bfd970..c607e9f909 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"
@@ -1150,6 +1151,17 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
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 */
if (!(flags & VIR_MIGRATE_OFFLINE)) {
if (qemuProcessAutoDestroyActive(driver, vm)) {
--
2.23.0.rc1