[openstack-dev] [nova] Enabling VM post-copy live migration
Luis Tomas
luis at cs.umu.se
Thu Mar 12 08:41:13 UTC 2015
Hi,
As part of an European (FP7) project, named ORBIT
(http://www.orbitproject.eu/), I'm working on including the possibility
of live-migrating VMs in OpenStack in a post-copy mode.
This way of live-migrating VMs basically moves the computation right
away to the destination and then the VM starts working from there, while
still copying the memory from the source to the new location of the VM.
That way the memory pages are only copied as if the VM modifies them,
they are already in the destination host. This basically ensures that
migrations finish regardless of what the VM is doing, i.e., even
extremely memory intensive VMs. Therefore removing the problem of having
VMs hanging on in migrating state forever (as discussed in previous
mails, e.g.,
http://lists.openstack.org/pipermail/openstack-dev/2015-February/055725.html).
So far, I have included and tested this new functionality at the JUNO
version, and the code modifications can be found in the github
repository of the project (branch named "post-copy"):
- https://github.com/orbitfp7/nova/tree/post-copy --> mainly
enabling the possibility of using the libvirt post-copy flag (libvirt
driver.py). Note post-copy migration is not using "tunneling" as LibVirt
patch for that is not yet ready.
- https://github.com/orbitfp7/python-novaclient/tree/post-copy -->
adding the possibility of using the post-copy mode when triggering the
migration: nova live-migration [--block-migrate] [--post-copy] VM_ID
- https://github.com/orbitfp7/horizon/tree/post-copy --> include a
checkbox in the live-migration panel to perform the migration in
post-copy mode. (like the one for enabling block-migration)
To be able to live-migrate VMs in a post-copy way, I'm relying on some
kernel+qemu+libvirt modifications, not yet merged upstream (but in their
way to it), also available at the project github:
- Kernel: https://lkml.org/lkml/2015/3/5/576
- Qemu: https://github.com/orbitfp7/qemu/tree/wp3-postcopy
- LibVirt: https://github.com/orbitfp7/libvirt/tree/wp3-postcopy
If this is a nice feature to have in future versions of OpenStack, I'm
happy to adapt the code for the next release (the one after KILO). Any
comments are really welcome.
Best regards,
Luis
--
-----------------------------------
Dr. Luis Tomás
Postdoctoral Researcher
Department of Computing Science
Umeå University
luis at cs.umu.se
www.cloudresearch.se
www8.cs.umu.se/~luis
------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150312/b416d95f/attachment.html>
More information about the OpenStack-dev
mailing list