[Lxc-users] systemd inside LXC

Serge Hallyn serge.hallyn at canonical.com
Sun Oct 21 20:00:10 UTC 2012


Quoting John (lxc at jelmail.com):
> On 19/10/12 16:51, Serge Hallyn wrote:
> >
> > Add:
> >
> > lxc.network.type = empty
> >
> > If you don't have any lxc.network.type sections, then the container
> > shares network with the host, and so the container talks to the host's
> > systemd.  (same with upstart)
> >
> >
> Thanks for the reply, I will try that tomorrow. I am sorry I wasn't 
> around to check for replies before now. One question though... I 
> actually want a separate network in the container (hence using veth) so 
> it has its own address distinct from the host. Are you saying that I 
> can't do this any more?

Not at all.  But if you're saying you have a 'lxc.network.type = veth'
in your container config, then what I said doesn't apply anyway.  It
sounds like the remount of /dev which Micheal mentioned is in fact your
real problem!

> I've also read the later replies and they seem to be saying that this 
> simply does not work (systemd inside a container). Given its 
> proliferation into other distros (I'm on Arch and that's the reason I am 
> looking at this now), where does systemd come in the priorities of LXC?

Where does LXC come in the priorities of systemd?  :)

(my point being that it might be far easier to patch systemd to make
the filesystems to mount configurable, versus implementing a devices
namespace in the kernel so that lxc can work around it)

But, lxc is open source, as is the kernel (and systemd) - when you send
patches, your priorities influence its priorities.

> I really hope we can get this working, as LXC has so far worked very 
> well for me.

-serge




More information about the lxc-users mailing list