d76c62
From 5ae52dc252691262663129e52dbf1a775cd92bb8 Mon Sep 17 00:00:00 2001
d76c62
Message-Id: <5ae52dc252691262663129e52dbf1a775cd92bb8@dist-git>
d76c62
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
d76c62
Date: Wed, 4 Mar 2020 12:42:45 +0100
d76c62
Subject: [PATCH] qemu: forbid migration with vhost-user-fs device
d76c62
MIME-Version: 1.0
d76c62
Content-Type: text/plain; charset=UTF-8
d76c62
Content-Transfer-Encoding: 8bit
d76c62
d76c62
This is not yet supported.
d76c62
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
d76c62
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
d76c62
Tested-by: Andrea Bolognani <abologna@redhat.com>
d76c62
(cherry picked from commit 5c0444a38bb37ddeb7049683ef72d02beab9e617)
d76c62
Signed-off-by: Ján Tomko <jtomko@redhat.com>
d76c62
d76c62
Conflicts: * downstream is missing commit 739bb1f26f9797f69023e221bef7c004adb9c522
d76c62
    qemu_migration: Rearrange some checks in qemuMigrationSrcIsAllowed()
d76c62
  src/qemu/qemu_migration.c
d76c62
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
d76c62
Message-Id: <426a6270b1e0265b4977ad70029342ca43f7ff48.1583322091.git.jtomko@redhat.com>
d76c62
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
d76c62
---
d76c62
 src/qemu/qemu_migration.c | 10 ++++++++++
d76c62
 1 file changed, 10 insertions(+)
d76c62
d76c62
diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c
d76c62
index 03f058051d..a677e270d4 100644
d76c62
--- a/src/qemu/qemu_migration.c
d76c62
+++ b/src/qemu/qemu_migration.c
d76c62
@@ -1281,6 +1281,16 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver,
d76c62
                            _("migration with shmem device is not supported"));
d76c62
             return false;
d76c62
         }
d76c62
+
d76c62
+        for (i = 0; i < vm->def->nfss; i++) {
d76c62
+            virDomainFSDefPtr fs = vm->def->fss[i];
d76c62
+
d76c62
+            if (fs->fsdriver == VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS) {
d76c62
+                virReportError(VIR_ERR_OPERATION_INVALID, "%s",
d76c62
+                               _("migration with virtiofs device is not supported"));
d76c62
+                return false;
d76c62
+            }
d76c62
+        }
d76c62
     }
d76c62
 
d76c62
     return true;
d76c62
-- 
d76c62
2.25.1
d76c62