From: Peter Krempa Date: Mon, 7 Jul 2014 08:00:46 +0000 (+0200) Subject: qemu: dump: Report better error when dumping VM with passthrough devices X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=315fba9c60082589cdf8a2b417c9a576c79d2800;p=people%2Fliuw%2Flibxenctrl-split%2Flibvirt.git qemu: dump: Report better error when dumping VM with passthrough devices 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 --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 2d1aa9ebd..fe76d5568 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);