From: Peter Krempa Date: Fri, 7 Dec 2012 11:06:30 +0000 (+0100) Subject: qemu: snapshot: Report better error message if migration isn't allowed X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=98e92ba83b7ed01515d7243a0012f4571800027b;p=libvirt.git qemu: snapshot: Report better error message if migration isn't allowed Qemu doesn't support migration on guests with host devices. This patch adds a check to ensure migration is safe before actually doing so. --- diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 93d9b69b49..9a449bfbeb 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -11430,6 +11430,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) |