[PATCH] qemu: snapshot: Report better error when create internal snapshot with passthrough devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When create internal system checkpoint snapshot, it will not works if
guest has passthrough devices attached. It will report error:

error: operation failed: Error -22 while writing VM
With this patch, it will report erro:

error: Requested operation is not valid: domain has assigned non-USB host devices

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=874418#c19
---
 src/qemu/qemu_driver.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 5dc62b0..0fdee26 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -12902,6 +12902,9 @@ qemuDomainSnapshotCreateActiveInternal(virConnectPtr conn,
         }
     }
 
+    if (!qemuMigrationIsAllowed(driver, vm, vm->def, false, false))
+        goto cleanup;
+
     if (qemuDomainObjEnterMonitorAsync(driver, vm,
                                        QEMU_ASYNC_JOB_SNAPSHOT) < 0) {
         resume = false;
-- 
1.8.3.1

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




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]