-
Notifications
You must be signed in to change notification settings - Fork 40
Live migrating OVZ mainstream container
This page describes how to create and live migrate and OVZ container on Fedora 20. Hopefully, the same is true for some other distros.
The p.haul needs this software to work
- CRIU. Take the HEAD of criu repository (http://github.com/xemul/criu), or the 1.2 release
- Python
- The protobuf-python package
make
to compile CRIU images reading modules for p.haul.
Also make sure, that source node has keys-based ssh access to the destination one, or the FS on which containers are located is shared between these two nodes. The former requirement is to make sure rsync can successfully copy container's private from source node to destination one.
P.Haul assumes, that private and root directories as /vz/private and /vz/root respectively (this is to be fixed some time soon though).
Checked and known to work are the templates below
- Centos-6-x86_64
- Ubuntu-10.04-x86_64
Migrating is done using the p.haul script with the help of p.haul service on destination node. Both, p.haul command and service use CRIU service to dump and restore container.
- Start CRIU service on both nodes
# criu service -v4 -o $log_file --daemon
- Start P.Haul service on destination node
# p.haul-service
- Do live migration
# p.haul ovz $id $dst_node_ip
- P.Haul makes criu keep log files and images in the
/var/local/p.haul-fs/$temp-name/
directory. When migration fails, this directory is not removed. - If you want to keep the images after successful migration, use the
--keep-images
option for P.Haul. - By default the log-level 2 is used by CRIU. To increase verbosity use the
-v$N
option for P.Haul.
Feel free to contact us on xemul (at) parallels (dot) com
and criu (at) openvz (dot) org