On 07/18/2011 06:27 PM, Jiri Denemark wrote:
This patch introduces several helper methods to deal with jobs and
phases during migration in a simpler manner.
---
  src/qemu/MIGRATION.txt    |   55 +++++++++++++++++++++++++++
  src/qemu/qemu_domain.c    |    5 ++
  src/qemu/qemu_migration.c |   91 +++++++++++++++++++++++++++++++++++++++++++++
  src/qemu/qemu_migration.h |   37 ++++++++++++++++++
  4 files changed, 188 insertions(+), 0 deletions(-)
  create mode 100644 src/qemu/MIGRATION.txt

diff --git a/src/qemu/MIGRATION.txt b/src/qemu/MIGRATION.txt
new file mode 100644
index 0000000..6c32998
--- /dev/null
+++ b/src/qemu/MIGRATION.txt
@@ -0,0 +1,55 @@
+    QEMU Migration Locking Rules
+    ============================

Cool file, but maybe it could also use an overview of the three migration protocols as a separate section, so that you can refer to the migration phases in the same document.

+++ b/src/qemu/qemu_migration.c
@@ -46,6 +46,19 @@

  #define VIR_FROM_THIS VIR_FROM_QEMU

+VIR_ENUM_IMPL(qemuMigrationJobPhase, QEMU_MIGRATION_PHASE_LAST,
+              "none",
+              "preform2",

s/preform/perform/

ACK with this squashed in:

diff --git i/src/qemu/MIGRATION.txt w/src/qemu/MIGRATION.txt
index 6c32998..a26a0f3 100644
--- i/src/qemu/MIGRATION.txt
+++ w/src/qemu/MIGRATION.txt
@@ -1,3 +1,48 @@
+    QEMU Migration Phases
+    =====================
+
+Qemu supports only migration protocols 2 and 3 (1 was lacking too many
+steps).  Repeating the protocol sequences from libvirt.c:
+
+Sequence v2:
+
+  Src: DumpXML
+    - Generate XML to pass to dst
+
+  Dst: Prepare
+    - Get ready to accept incoming VM
+    - Generate optional cookie to pass to src
+
+  Src: Perform
+    - Start migration and wait for send completion
+    - Kill off VM if successful, resume if failed
+
+  Dst: Finish
+    - Wait for recv completion and check status
+    - Kill off VM if unsuccessful
+
+Sequence v3:
+
+  Src: Begin
+    - Generate XML to pass to dst
+    - Generate optional cookie to pass to dst
+
+  Dst: Prepare
+    - Get ready to accept incoming VM
+    - Generate optional cookie to pass to src
+
+  Src: Perform
+    - Start migration and wait for send completion
+    - Generate optional cookie to pass to dst
+
+  Dst: Finish
+    - Wait for recv completion and check status
+    - Kill off VM if failed, resume if success
+    - Generate optional cookie to pass to src
+
+  Src: Confirm
+    - Kill off VM if success, resume if failed
+
     QEMU Migration Locking Rules
     ============================

diff --git i/src/qemu/qemu_migration.c w/src/qemu/qemu_migration.c
index 6ca9aa5..fba88c9 100644
--- i/src/qemu/qemu_migration.c
+++ w/src/qemu/qemu_migration.c
@@ -48,7 +48,7 @@

 VIR_ENUM_IMPL(qemuMigrationJobPhase, QEMU_MIGRATION_PHASE_LAST,
               "none",
-              "preform2",
+              "perform2",
               "begin3",
               "perform3",
               "perform3_done",

--
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to