Features/PostcopyRecovery: Difference between revisions
No edit summary |
(Postcopy Recovery Procedures) |
||
Line 1: | Line 1: | ||
< | === QMP handshake === | ||
{"execute": "qmp_capabilities"}<br> | |||
{"return": {}}<br> | |||
=== Enable postcopy === | |||
{"execute": " | {"execute": "migrate-set-capabilities", "arguments": {"capabilities": [{"state": true, "capability": "postcopy-ram"}]}}<br> | ||
{"return": {}} | {"return": {}}<br> | ||
=== Start precopy migration === | |||
{"execute": "migrate | {"execute": "migrate", "arguments": {"uri": "unix:/tmp/migration-test-12K6jV/migsocket"}}<br> | ||
{"return": {}} | {"return": {}}<br> | ||
=== Start postcopy migration === | |||
{"execute": "migrate" | {"execute": "migrate-start-postcopy"}<br> | ||
{" | {"return": {}}<br> | ||
{"timestamp": {"seconds": 1559730429, "microseconds": 585575}, "event": "STOP"}<br> | |||
{"timestamp": {"seconds": 1559730429, "microseconds": 613592}, "event": "RESUME"}<br> | |||
=== Manually pause the postcopy migration before it completes. This emulates a network failure. === | |||
{"execute": "migrate- | {"execute": "migrate-pause"}<br> | ||
{"return": {}} | {"return": {}}<br> | ||
=== Check the status of migration, should be "postcopy-paused" === | |||
{"execute": "migrate | {"execute": "query-migrate"}<br> | ||
{"return": {}} | {"return": {"status": "postcopy-paused", "socket-address": [{"path": "/tmp/migration-test-12K6jV/migsocket", "type": "unix"}]}}<br> | ||
=== 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"}<br> | ||
{" | {"timestamp": {"seconds": 1559730429, "microseconds": 620072}, "event": "MIGRATION", "data": {"status": "setup"}}<br> | ||
{"return": {}, "id": "recover-cmd"}<br> | |||
=== Wait until migration completes (status becomes "completed") === | |||
{"execute": "query-migrate"}<br> | |||
{"return": {"postcopy-blocktime": 89, "status": "completed", "postcopy-vcpu-blocktime": [90]}}<br> | |||
{"execute": "query-migrate"} | |||
{"return": {"postcopy-blocktime": 89, "status": "completed", "postcopy-vcpu-blocktime": [90]}} | |||
< |
Revision as of 10:42, 5 June 2019
QMP handshake
{"execute": "qmp_capabilities"}
{"return": {}}
Enable postcopy
{"execute": "migrate-set-capabilities", "arguments": {"capabilities": [{"state": true, "capability": "postcopy-ram"}]}}
{"return": {}}
Start precopy migration
{"execute": "migrate", "arguments": {"uri": "unix:/tmp/migration-test-12K6jV/migsocket"}}
{"return": {}}
Start postcopy migration
{"execute": "migrate-start-postcopy"}
{"return": {}}
{"timestamp": {"seconds": 1559730429, "microseconds": 585575}, "event": "STOP"}
{"timestamp": {"seconds": 1559730429, "microseconds": 613592}, "event": "RESUME"}
Manually pause the postcopy migration before it completes. This emulates a network failure.
{"execute": "migrate-pause"}
{"return": {}}
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"}]}}
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"}
Wait until migration completes (status becomes "completed")
{"execute": "query-migrate"}
{"return": {"postcopy-blocktime": 89, "status": "completed", "postcopy-vcpu-blocktime": [90]}}