Containers HOWTO? (Where do I start?)

Serge E. Hallyn serge.hallyn at canonical.com
Wed Dec 8 14:11:43 PST 2010


Quoting Rob Landley (rlandley at parallels.com):
> But how does pivot_root enter into this when you haven't got an initrd to
> free?  I thought when you killed a container's init process that killed all

But pivot_root isn't just for initrd.  At this point I think both
libvirt-lxc and lxc.sf.net use pivot_root in favor of chroot for
creating containers.  Of course there are some stringent rules about the
pre-existing old (put) and new roots regarding sharing - you can best
see those in fs/namespace.c:pivot_root, i don't know that they're well
documented anywhere.

> the children and freed the resources, so how does pivot_root enter
> into this?  (You don't reparent existing processes, you span new ones,
> right?)

Right.  And you do the pivot_root only for the container, not the
whole system.  Sorry, I'm missing something about what you're saying
about killing the container.

-serge


More information about the Containers mailing list