[lxc-users] Procdeure for to move a container from host1 to host2

Serge Hallyn serge.hallyn at ubuntu.com
Mon Aug 31 13:57:37 UTC 2015


the cgroup info is contained in the container configuration file.  So make
sure to copy that and not just the container rootfs.

-serge

Quoting Pablo Silva (psilvao at gmail.com):
> Thanks Serge! for your response..
> 
> We want to move a stop container from hosta to host b, my big question is,
> simply make a copy rsync or I should also copy the cgroups information to
> the host b?
> 
> -Pablo
> 
> On Mon, Aug 31, 2015 at 10:47 AM, Serge Hallyn <serge.hallyn at ubuntu.com>
> wrote:
> 
> > Quoting Pablo Silva (psilvao at gmail.com):
> > > Dear colleagues:
> > >
> > >      I need to know how to move a container that is on host1 host2
> > towards.
> > >
> > >      I can use lxc-clone or just rsync is from host1 to host2 ?, what
> > > happens to the information generated in / cgrups?
> >
> > Wait, do you want to copy a running container?  The /cgroup info is not
> > persistent, so if the container is shutdown then it's irrelevant.  If
> > the container is running, then criu takes care of checkpointing and
> > restarting that info.
> >
> > So for a non-running container 'rsync --numeric-ids' should be fine.
> > Otherwise you probably want to be using lxd.  ('lxc move' will work
> > there for either case)
> >
> > -serge
> > _______________________________________________
> > lxc-users mailing list
> > lxc-users at lists.linuxcontainers.org
> > http://lists.linuxcontainers.org/listinfo/lxc-users

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list