When SPICE graphics is configured for a domain but we did not ask the client to switch to the destination, we should not wait for SPICE_MIGRATE_COMPLETED event (which will never come). https://bugzilla.redhat.com/show_bug.cgi?id=1151723 Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/qemu/qemu_domain.h | 2 ++ src/qemu/qemu_migration.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 8359b1a..0144792 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -137,6 +137,8 @@ struct qemuDomainJobObj { qemuDomainJobInfoPtr current; /* async job progress data */ qemuDomainJobInfoPtr completed; /* statistics data of a recently completed job */ bool abortJob; /* abort of the job requested */ + bool spiceMigration; /* we asked for spice migration and we + * should wait for it to finish */ bool spiceMigrated; /* spice migration completed */ }; diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 704e182..64cbffa 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2415,7 +2415,8 @@ qemuMigrationWaitForSpice(virDomainObjPtr vm) bool wait_for_spice = false; size_t i = 0; - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION)) + if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_SEAMLESS_MIGRATION) || + !priv->job.spiceMigration) return 0; for (i = 0; i < vm->def->ngraphics; i++) { @@ -2789,6 +2790,7 @@ qemuDomainMigrateGraphicsRelocate(virQEMUDriverPtr driver, QEMU_ASYNC_JOB_MIGRATION_OUT) == 0) { ret = qemuMonitorGraphicsRelocate(priv->mon, type, listenAddress, port, tlsPort, tlsSubject); + priv->job.spiceMigration = !ret; if (qemuDomainObjExitMonitor(driver, vm) < 0) ret = -1; } -- 2.7.2 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list