Mark McLoughlin 3f397d
From: "Daniel P. Berrange" <berrange@redhat.com>
Mark McLoughlin 3f397d
To: libvir-list@redhat.com
Mark McLoughlin 3f397d
Date: Thu, 30 Apr 2009 15:09:05 +0100
Mark McLoughlin 3f397d
Subject: [libvirt] PATCH: Enable migration with QEMU >= 0.10.0
Mark McLoughlin 3f397d
Mark McLoughlin 3f397d
The KVM migration code was added to QEMU for the 0.10.0 release, so we 
Mark McLoughlin 3f397d
should enable this in libvirt now.
Mark McLoughlin 3f397d
Mark McLoughlin 3f397d
Daniel
Mark McLoughlin 3f397d
Mark McLoughlin 3f397d
diff -r be7993675e07 src/qemu_conf.c
Mark McLoughlin 3f397d
--- a/src/qemu_conf.c	Thu Apr 30 14:49:27 2009 +0100
Mark McLoughlin 3f397d
+++ b/src/qemu_conf.c	Thu Apr 30 15:08:45 2009 +0100
Mark McLoughlin 3f397d
@@ -473,16 +473,13 @@ int qemudExtractVersionInfo(const char *
Mark McLoughlin 3f397d
 
Mark McLoughlin 3f397d
     /*
Mark McLoughlin 3f397d
      * Handling of -incoming arg with varying features
Mark McLoughlin 3f397d
-     *  -incoming tcp    (kvm >= 79)
Mark McLoughlin 3f397d
-     *  -incoming exec   (kvm >= 80)
Mark McLoughlin 3f397d
+     *  -incoming tcp    (kvm >= 79, qemu >= 0.10.0)
Mark McLoughlin 3f397d
+     *  -incoming exec   (kvm >= 80, qemu >= 0.10.0)
Mark McLoughlin 3f397d
      *  -incoming stdio  (all earlier kvm)
Mark McLoughlin 3f397d
      *
Mark McLoughlin 3f397d
      * NB, there was a pre-kvm-79 'tcp' support, but it
Mark McLoughlin 3f397d
      * was broken, because it blocked the monitor console
Mark McLoughlin 3f397d
      * while waiting for data, so pretend it doesn't exist
Mark McLoughlin 3f397d
-     *
Mark McLoughlin 3f397d
-     * XXX when next QEMU release after 0.9.1 arrives,
Mark McLoughlin 3f397d
-     * we'll need to add MIGRATE_QEMU_TCP/EXEC here too
Mark McLoughlin 3f397d
      */
Mark McLoughlin 3f397d
     if (kvm_version >= 79) {
Mark McLoughlin 3f397d
         flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP;
Mark McLoughlin 3f397d
@@ -490,6 +487,9 @@ int qemudExtractVersionInfo(const char *
Mark McLoughlin 3f397d
             flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC;
Mark McLoughlin 3f397d
     } else if (kvm_version > 0) {
Mark McLoughlin 3f397d
         flags |= QEMUD_CMD_FLAG_MIGRATE_KVM_STDIO;
Mark McLoughlin 3f397d
+    } else if (version >= 10000) {
Mark McLoughlin 3f397d
+        flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_TCP;
Mark McLoughlin 3f397d
+        flags |= QEMUD_CMD_FLAG_MIGRATE_QEMU_EXEC;
Mark McLoughlin 3f397d
     }
Mark McLoughlin 3f397d
 
Mark McLoughlin 3f397d
     if (retversion)
Mark McLoughlin 3f397d
Mark McLoughlin 3f397d
Mark McLoughlin 3f397d
--