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