How to do Live Migration with C/R

Hey There,

I’m using SaiedKazemi’s code ( ) for checkpointing and restoring a container. It works fine. How do I move a checkpointed container to a new machine?

I tried copying the state of the checkpointed container from /var/lib/docker/containers/<containerid> to the same location on target machine. Then I gave “docker restore <containerid>” on target machine. As expected, I get:

Error response from daemon: no such id: <containerid>

How do I solve this?. How to make the target docker daemon recognize/enroll the id of the migrated container?

Any help in the direction will help.

Solved… well, almost

After trying out a few things, I found the mistake myself. The kernel version was not identical on the source and destination machines.

After resolving that too there is a small problem. The docker daemon still says “no such id”. But, if we restart the daemon, it reads the new files and is able to restore the container.

Question: How do we make the docker daemon scan for new aufs images available in the system without restarting it?

Problem: The checkpoint operation fails if there is a port forwarding. eg., “docker run -t -p 80:80 nginx” cannot be checkpointed, whereas “docker run nginx” can be checkpointed. Error is:
Error response from daemon: Cannot checkpoint container ad5e2a08a43a: exit status 1
FATA[0000] Error: failed to checkpoint one or more containers