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

Tycho Andersen tycho.andersen at canonical.com
Fri Sep 11 08:57:29 PDT 2015


On Fri, Sep 11, 2015 at 11:53:19AM -0400, Tina Li wrote:
> Thank you, Tycho.
> Do you have any idea how to start a process in the container and it is the
> child of the container's init?

Usually I just install ssh and ssh to the container. Since ssh is then
spawned by the init, and every session/process is a child of it, it
should c/r.

Tycho

> 
> On Fri, Sep 11, 2015 at 11:40 AM, Tycho Andersen <
> tycho.andersen at canonical.com> wrote:
> 
> > 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