[CRIU] LXC checkpoint/restore HOWTO using upstream tools

Tycho Andersen tycho.andersen at canonical.com
Fri Sep 19 06:36:35 PDT 2014


On Fri, Sep 19, 2014 at 08:26:47AM -0500, Tycho Andersen wrote:
> On Fri, Sep 19, 2014 at 11:17:55AM +0400, Pavel Emelyanov wrote:
> > On 09/19/2014 04:39 AM, Tycho Andersen wrote:
> > > Hi all,
> > > 
> > > It seems there is more interest in doing checkpoint/restore of LXCs. I
> > > have written a little howto about how to use the upstream LXC tools
> > > with criu integration do do this:
> > > 
> > > http://www.criu.org/LXC#Using_LXC_Upstream_tools
> > 
> > That's awesome! Thank you for that.
> > 
> > Did you implement the "reattach" facility when restore container
> > got reattached back to the lxc daemon?
> 
> Yes, all of that should work. Ideally it would be totally transparent
> that you've resumed a container via lxc-checkpoint -r instead of
> started it via lxc-start. There are three bugs about this that I know
> if right now:
> 
> * You can't checkpoint containers that have been restored. This is the
>   tty bug that Cyrill and I talked about a while ago.
> * Possibly related, when you try and lxc-stop a restored container, it
>   hangs once the container is stopped and leaves a getty that is
>   taking 100% CPU.
> * There is some small bug with how the cgroups are reattached when
>   they are co-mounted. I am going to look into this today.

I guess one other thing to point out is that I have migrated
containers across hosts just by rsyncing the checkpoint directory and
the rootfs. When I restore them, they come back up and you can inspect
them with the new machine's LXC tools.

Tycho


More information about the CRIU mailing list