]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix migration with QEMU 1.6
authorMichael Avdienko <whitearchey@gmail.com>
Fri, 15 Nov 2013 11:47:43 +0000 (20:47 +0900)
committerCole Robinson <crobinso@redhat.com>
Sun, 17 Nov 2013 23:03:04 +0000 (18:03 -0500)
QEMU 1.6.0 introduced new migration status: setup
Libvirt does not expect such string in QMP and refuses to migrate with error
"unexpected migration status in setup"

This patch fixes it.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
(cherry picked from commit d35ae4143d11f45856ae002fcd419da0eb9bba9f)

src/qemu/qemu_migration.c
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.h

index 04313e79ca32bbf5834c3a7bd77dbcaee5d966ce..c0b17c3d5193d5b3b19e3df571477fc236bda73e 100644 (file)
@@ -1650,6 +1650,10 @@ qemuMigrationUpdateJobStatus(virQEMUDriverPtr driver,
                        _("%s: %s"), job, _("is not active"));
         break;
 
+    case QEMU_MONITOR_MIGRATION_STATUS_SETUP:
+        ret = 0;
+        break;
+
     case QEMU_MONITOR_MIGRATION_STATUS_ACTIVE:
         priv->job.info.fileTotal = priv->job.status.disk_total;
         priv->job.info.fileRemaining = priv->job.status.disk_remaining;
index a601ee0f7ba45e49922acff4aa1e3dbdf2c2e85c..7e26377f5aaa0042bdda8ec9b29c40ed99e0a75e 100644 (file)
@@ -114,7 +114,7 @@ VIR_ONCE_GLOBAL_INIT(qemuMonitor)
 
 VIR_ENUM_IMPL(qemuMonitorMigrationStatus,
               QEMU_MONITOR_MIGRATION_STATUS_LAST,
-              "inactive", "active", "completed", "failed", "cancelled")
+              "inactive", "active", "completed", "failed", "cancelled", "setup")
 
 VIR_ENUM_IMPL(qemuMonitorMigrationCaps,
               QEMU_MONITOR_MIGRATION_CAPS_LAST,
index 06ba7e8717e0d9efd3fab83b6f9957cb0fc236b7..8ec721bc6a06e12357447fba34d4e14c90cbab17 100644 (file)
@@ -396,6 +396,7 @@ enum {
     QEMU_MONITOR_MIGRATION_STATUS_COMPLETED,
     QEMU_MONITOR_MIGRATION_STATUS_ERROR,
     QEMU_MONITOR_MIGRATION_STATUS_CANCELLED,
+    QEMU_MONITOR_MIGRATION_STATUS_SETUP,
 
     QEMU_MONITOR_MIGRATION_STATUS_LAST
 };