[PATCH] qemu: dump: Report better error when dumping VM with passthrough devices

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

 



For the regular dump operation we migrate the VM to a file. This won't
work when the VM has passthrough devices assigned. Rather than reporting
a cryptic error from qemu run our check whether it can be migrated.

This does not influence the memory-only dump that is allowed with
passthrough devices.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=874418
---
 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 2d1aa9e..fe76d55 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -3481,6 +3481,10 @@ doCoreDump(virQEMUDriverPtr driver,
                              "memory-only dump"));
             goto cleanup;
         }
+
+        if (!qemuMigrationIsAllowed(driver, vm, vm->def, false, false))
+            goto cleanup;
+
         ret = qemuMigrationToFile(driver, vm, fd, 0, path,
                                   qemuCompressProgramName(compress), false,
                                   QEMU_ASYNC_JOB_DUMP);
-- 
2.0.0

--
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]