]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
qemu: dump: Report better error when dumping VM with passthrough devices
authorPeter Krempa <pkrempa@redhat.com>
Mon, 7 Jul 2014 08:00:46 +0000 (10:00 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 7 Jul 2014 08:44:34 +0000 (10:44 +0200)
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

index 2d1aa9ebd81411d5487a80311b76b2c0a6d25819..fe76d5568b9f4d495beaa37364f996a0825f7bc5 100644 (file)
@@ -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);