Skip to content

Commit

Permalink
Include container migration into tutorial
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <areber@redhat.com>
  • Loading branch information
adrianreber committed Feb 6, 2019
1 parent 6c1236a commit 0ba0da7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions docs/tutorials/podman_tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,28 @@ After being restored, the container will answer requests again as it did before
curl http://<IP_address>: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, transfered to the destination system and then restored on the destination
system. To be able to transfer the checkpoint it is possible to specify an output-file.

On the source system:
```console
sudo podman container checkpoint <container_id> -e /tmp/checkpoint.tar.gz
scp /tmp/checkpoint.tar.gz <destination_system>:/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://<IP_address>:8080
```

### Stopping the container
To stop the httpd container:
```console
Expand Down

0 comments on commit 0ba0da7

Please sign in to comment.