[CRIU] Use lxc-checkpoint to checkpoint/restore the container

Tycho Andersen tycho.andersen at canonical.com
Fri Sep 11 08:40:58 PDT 2015


Hi,

On Fri, Sep 11, 2015 at 11:21:17AM -0400, Tina Li wrote:
> Hi all,
> I am trying to checkpoint/restore the container using the following
> commands.
>  sudo lxc-checkpoint -s -D /tmp/checkpoint -n mycontainer
>  sudo lxc-checkpoint -r -D /tmp/checkpoint -n mycontainer
> The lxc-checkpoint command will invoke criu to do checkpoint and restore.
> I have some doubts:
> 1) After restoring the container, why all the process pids related to the
> container are changed?
> E.g. before checkpoint, the PID of container is 1385, but after restore the
> PID of the container is  3089. (1385 is not occupied by other process.)

The pids in the host pid namespace are different, but in the
container's pid namespace they are the same.

> 2) If I use lxc-attach to enter the container, and run a process in it.
> Then when checkpoint the container, the process is stopped, but when
> restore the container, the process is not resumed. Does anyone know why?

Processes started by lxc-attach aren't children of the container's
init, which likely confuses criu.

Tycho


More information about the CRIU mailing list