
From: Daniel Henrique Barboza <dhbarboza82@gmail.com> Changes in v3: - get hostname by using python socket API instead of run_command with 'hostname' command - closed remote connection in _migrate_task - removed 'test:///default' declaration in test files - added a test to cover the API Changes in v2: - changes asked by pvital: verifying host name properly, break line in docs/API.md, changed the format of i18n messages. - one of the existing tests was enhanced to support the local host verification properly. ---- This patch series implements the first release of the Live (and cold!) migration in Kimchi. *** Requirements for a VM migration *** - shared storage. The disk/storage path must be the same at the origin and destination. - password-less login - enough resorces in the destination host to allocate the VM Limitations of this first version and possible candidates for future work: - non-shared migration not supported - do not automate the process of password-less login (but it is able to verify this condition) - due to the above limitation, the 'user' parameter value is only 'root' at this moment - do not verify the 'shared storage' condition - do not verify same hypervisor/arch conditions - the origin VM will shutdown after migration (not sure if can be helped) *** Curl usage *** curl -u username -H "Content-Type: application/json" -H "Accept: application/json" -k "https://localhost:10001/plugins/kimchi/vms/<VM NAME>/migrate" -X POST -d '{"remote_host":"insert_remote_IP_address", "user":"username"}' *** Unit test usage *** The unit tests for this feature needs an additional parameter in the command line of ./run-tests.sh: $ sudo KIMCHI_LIVE_MIGRATION_TEST=remote_host_IP ./run_tests.sh test_livemigration If this parameter is not supplied the unit test will simply skip. The test also verifies the password-less condition before trying to test a vm migration. Daniel Henrique Barboza (3): Live migration backend: API and messages Live migration backend: control/vms and model/vms changes Live migration backend: unit tests src/wok/plugins/kimchi/API.json | 17 + src/wok/plugins/kimchi/control/vms.py | 3 + src/wok/plugins/kimchi/docs/API.md | 5 + src/wok/plugins/kimchi/i18n.py | 7 + src/wok/plugins/kimchi/model/vms.py | 75 ++++- src/wok/plugins/kimchi/tests/test_livemigration.py | 356 +++++++++++++++++++++ src/wok/plugins/kimchi/ui/js/src/kimchi.api.js | 13 + 7 files changed, 475 insertions(+), 1 deletion(-) create mode 100644 src/wok/plugins/kimchi/tests/test_livemigration.py -- 2.4.3