mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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:
parent
e5d3ab5e21
commit
98e92ba83b
@ -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) |
|
||||
|
Loading…
x
Reference in New Issue
Block a user