From a4d33330d6886ab90f7d90ef686f2eee4dda683b Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Tue, 5 Feb 2019 17:20:31 +0000 Subject: Include container migration into tutorial Signed-off-by: Adrian Reber --- docs/tutorials/podman_tutorial.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'docs/tutorials/podman_tutorial.md') diff --git a/docs/tutorials/podman_tutorial.md b/docs/tutorials/podman_tutorial.md index 032b7c851..8b29264db 100644 --- a/docs/tutorials/podman_tutorial.md +++ b/docs/tutorials/podman_tutorial.md @@ -96,6 +96,28 @@ After being restored, the container will answer requests again as it did before curl http://:8080 ``` +### Migrate the container +To live migrate a container from one host to another the container is checkpointed on the source +system of the migration, transferred to the destination system and then restored on the destination +system. When transferring the checkpoint, it is possible to specify an output-file. + +On the source system: +```console +sudo podman container checkpoint -e /tmp/checkpoint.tar.gz +scp /tmp/checkpoint.tar.gz :/tmp +``` + +On the destination system: +```console +sudo podman container restore -i /tmp/checkpoint.tar.gz +``` + +After being restored, the container will answer requests again as it did before checkpointing. This +time the container will continue to run on the destination system. +```console +curl http://:8080 +``` + ### Stopping the container To stop the httpd container: ```console -- cgit v1.2.3-54-g00ecf