Features/PostcopyRecovery

From QEMU
Revision as of 10:36, 5 June 2019 by Peterx (talk | contribs) (Postcopy Recovery Procedures)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  1. QMP handshake

{"execute": "qmp_capabilities"} {"return": {}}

  1. Enable postcopy

{"execute": "migrate-set-capabilities", "arguments": {"capabilities": [{"state": true, "capability": "postcopy-ram"}]}} {"return": {}}

  1. Start precopy migration

{"execute": "migrate", "arguments": {"uri": "unix:/tmp/migration-test-12K6jV/migsocket"}} {"return": {}}

  1. Start postcopy migration

{"execute": "migrate-start-postcopy"} {"return": {}} {"timestamp": {"seconds": 1559730429, "microseconds": 585575}, "event": "STOP"} {"timestamp": {"seconds": 1559730429, "microseconds": 613592}, "event": "RESUME"}

  1. Manually pause the postcopy migration before it completes. This emulates a network failure.

{"execute": "migrate-pause"} {"return": {}}

  1. Check the status of migration, should be "postcopy-paused"

{"execute": "query-migrate"} {"return": {"status": "postcopy-paused", "socket-address": [{"path": "/tmp/migration-test-12K6jV/migsocket", "type": "unix"}]}}

  1. Try to continue the previous postcopy migration, until it finishes

{"execute": "migrate-recover", "arguments": {"uri": "unix:/tmp/migration-test-12K6jV/migsocket-recover"}, "id": "recover-cmd"} {"timestamp": {"seconds": 1559730429, "microseconds": 620072}, "event": "MIGRATION", "data": {"status": "setup"}} {"return": {}, "id": "recover-cmd"}

  1. Wait until migration completes (status becomes "completed")

{"execute": "query-migrate"} {"return": {"postcopy-blocktime": 89, "status": "completed", "postcopy-vcpu-blocktime": [90]}}