Live migrate OVZ container
Jump to navigation
Jump to search
We have the p.haul project that implements live migration using CRIU. This page summarizes our experience with live-migrating OpenVZ containers.
Centos-6-x86_64-devel
Need to put container's private on NFS. To do this the /vz should be an NFS mount on both node. E.g. like this
Container should be created w/o userns support
# vzctl create 100 --ostemplate=centos-6-x86_64-devel --local_uid=0 --local_gid=0
The following BUGs affect migration
- Blockers
- https://bugzilla.openvz.org/show_bug.cgi?id=2874 -- init and crond use fsnotify/inotify which will not work on NFS
- Would be nice to fix
- https://bugzilla.openvz.org/show_bug.cgi?id=2873 -- killing udev solves the problem, as nobody has files opened on devtmps after it
- https://bugzilla.openvz.org/show_bug.cgi?id=2870 -- you can create a symlink /usr/bin/tar -> /bin/tar inside container to workaround
Apply these kludges to p.haul.
Live migrate a container using
# p.haul <init-pid> <node2-ip>
command.