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.
This commit is contained in:
Peter Krempa 2012-12-07 12:06:30 +01:00
parent e5d3ab5e21
commit 98e92ba83b

View File

@ -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) |