[4/5] QMP: Emit migration events on incoming migration

Submitted by Juan Quintela on May 25, 2010, 2:21 p.m.

Details

Message ID cbdd5fabca8b281db3e1381a898447b481365770.1274796992.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela May 25, 2010, 2:21 p.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 migration.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch hide | download patch | download mbox

diff --git a/migration.c b/migration.c
index c388902..32470d5 100644
--- a/migration.c
+++ b/migration.c
@@ -60,10 +60,13 @@  int qemu_start_incoming_migration(const char *uri)

 void process_incoming_migration(QEMUFile *f)
 {
+    monitor_protocol_event(QEVENT_MIGRATION_STARTED, NULL);
     if (qemu_loadvm_state(f) < 0) {
+        monitor_protocol_event(QEVENT_MIGRATION_FAILED, NULL);
         fprintf(stderr, "load of migration failed\n");
         exit(0);
     }
+    monitor_protocol_event(QEVENT_MIGRATION_ENDED, NULL);
     qemu_announce_self();
     DPRINTF("successfully loaded vm state\n");