Qemu doesn't support migration on guests with host devices. This patch
adds a check to ensure migration is safe before actualy doing so.
---
 src/qemu/qemu_driver.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 6f8f840..4423e69 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11428,6 +11428,10 @@ qemuDomainSnapshotCreateActiveExternal(virConnectPtr 
conn,

     /* do the memory snapshot if necessary */
     if (memory) {
+        /* check if migration is possible */
+        if (!qemuMigrationIsAllowed(driver, vm, vm->def, false))
+            goto endjob;
+
         /* allow the migration job to be cancelled or the domain to be paused 
*/
         qemuDomainObjSetAsyncJobMask(vm, DEFAULT_JOB_MASK |
                                      JOB_MASK(QEMU_JOB_SUSPEND) |
-- 
1.8.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to