From 0028578b432d207e1e5b313c76e587eae275bdac Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 6 Feb 2019 19:22:46 +0000 Subject: Added support to migrate containers This commit adds an option to the checkpoint command to export a checkpoint into a tar.gz file as well as importing a checkpoint tar.gz file during restore. With all checkpoint artifacts in one file it is possible to easily transfer a checkpoint and thus enabling container migration in Podman. With the following steps it is possible to migrate a running container from one system (source) to another (destination). Source system: * podman container checkpoint -l -e /tmp/checkpoint.tar.gz * scp /tmp/checkpoint.tar.gz destination:/tmp Destination system: * podman pull 'container-image-as-on-source-system' * podman container restore -i /tmp/checkpoint.tar.gz The exported tar.gz file contains the checkpoint image as created by CRIU and a few additional JSON files describing the state of the checkpointed container. Now the container is running on the destination system with the same state just as during checkpointing. If the container is kept running on the source system with the checkpoint flag '-R', the result will be that the same container is running on two different hosts. Signed-off-by: Adrian Reber --- cmd/podman/cliconfig/config.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd/podman/cliconfig') diff --git a/cmd/podman/cliconfig/config.go b/cmd/podman/cliconfig/config.go index aaa4513d8..d742830ee 100644 --- a/cmd/podman/cliconfig/config.go +++ b/cmd/podman/cliconfig/config.go @@ -89,6 +89,7 @@ type CheckpointValues struct { TcpEstablished bool All bool Latest bool + Export string } type CommitValues struct { @@ -426,6 +427,7 @@ type RestoreValues struct { Keep bool Latest bool TcpEstablished bool + Import string } type RmValues struct { -- cgit v1.2.3-54-g00ecf