== Checkpointing and live migration ==
Live migration '''Checkpointing''' is an ability OpenVZ kernel feature that makes it able to move freeze a running container (i.e. pause all its processes) and dump its complete in-kernel state into a file on disk. Such a dump file contains everything about processes inside a container: their memory, opened files, network connections, states etc. Then, a running container can be restored from one physical server the dump file and continue to another without a shutdown or service interruptionrun normally. Live migration The concept is based on checkpointingsomewhat similar to suspend-to-disk, it does not require any special hardware, disk or networking setuponly for a single container and much faster.
Checkpointing is an OpenVZ kernel feature that makes it able to freeze a running container (i.e. pause all its processes) and dump its complete in-kernel state into a file on disk. Such a dump file contains everything about processes inside a container: their memory, opened files, network connections, states etc. It is possible to restore a A container can be restored from a dump file and resume its execution, with. From inside the container it looks like a mere jump forward in time, there are no other side effects. Container can also be restored on a different systemphysical server, and if its file system is opening the same it will continue to run as is on a new systemdoor for live migration.
Checkpointing '''Live migration''' is currently supported for x86an ability to move a running container from one physical server to another without a shutdown or service interruption. Network connections are migrated as well, x86_64 (previously so from a user's point of view it was also supported on IA64)looks like some delay in response. OpenVZ live migration does not require any special hardware, disk or networking setup.It is implemented in the following way:
{{FIXME|: what else?}}# Run rsync to copy container files to the destination system (the container is still running)# Freeze and checkpoint the container# Run rsync again, to catch the changes in files while the container was still running# Copy the dump file to the destination system# Undump and resume the container on the destination system If container is residing on a shared storage (like NFS or SAN) there is no need to copy its files, one just checkpoints the container on one system and restores it on another. Network connections are fully preserved and migrated. Upon finishing migration, destination server sends an ARP announce telling that this IP address is now lives on this MAC. While the container is frozen, all the incoming packets for it are dropped. In case of TCP, such packets will be retransmitted by the sending side, while in case of UDP packets are supposed to be lost sometimes. Unlike other containers functionality, which is architecture-agnostic (and therefore containers on ARM or MIPS are easy to have), checkpointing is architecture-dependent. It is currently supported for x86, x86_64 (previously it was also supported on IA64).
== Miscellaneous topics ==