qemu migration: tcp migration: changing end-of-migration protocol
commitd717ace1b4c50bb233a981bcbfb1f13ea7290aa8
authorUri Lublin <uril@qumranet.com>
Wed, 7 Mar 2007 17:12:45 +0000 (7 17:12 +0000)
committerUri Lublin <uril@qumranet.com>
Wed, 7 Mar 2007 17:12:45 +0000 (7 17:12 +0000)
tree2e026890288f11cb1136965aff3c9a95388ab1d4
parent6d6a79fa7a57e9e3e770d656f82d8511c2fff59e
qemu migration: tcp migration: changing end-of-migration protocol

The migration protocol is as follows (let the guest migrate from A to B):
  1. A sends VM-state to B and waits for ACK
  2. B receive VM-state and sends ACK and waits for GO
  3. A receive ACK and sends GO (A does not continue running the guest)
  4. B receive GO and continue running the guest (success).

If anything goes wrong on steps 1 or 2 (migration failure) A continue running
    the guest and B exists.

The GO message is an addition to the previous protocol.
In the previous protocol B would continue after step 2 (after sending ACK).
But A would consider the migration to fail unless it received ACK
Theoretically, both sides may continue to run the guest if the ACK message
    was lost (altough practically it's very rare).
By adding the GO message we ensure such situation can not happen.
It may happen that both sides would not continue to run the guest which would
    stay in a stopped mode. In that case the user (or a management software)
    would decide where to continue running the guest.
Also the GO message vulnerability time frame is shorter than that of the
    ACK message.

TODO: timeout if an ACK/GO message does not arrive
migration.c