
Reviewed-By: Paulo Vital <pvital@linux.vnet.ibm.com> On Wed, 2015-10-28 at 15:41 -0200, dhbarboza82@gmail.com wrote:
From: Daniel Henrique Barboza <dhbarboza82@gmail.com>
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.
*** SUBJECT HERE ***
*** BLURB HERE ***
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 | 9 + src/wok/plugins/kimchi/model/vms.py | 73 +++++- src/wok/plugins/kimchi/tests/test_livemigration.py | 282 +++++++++++++++++++++ src/wok/plugins/kimchi/ui/js/src/kimchi.api.js | 13 + 7 files changed, 401 insertions(+), 1 deletion(-) create mode 100644 src/wok/plugins/kimchi/tests/test_livemigration.py