mirror of
https://github.com/containers/podman.git
synced 2025-05-19 16:18:51 +08:00
Include container migration into tutorial
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
@ -96,6 +96,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, 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 <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
|
||||
|
Reference in New Issue
Block a user