[Lxc-users] [lxc-devel] [systemd-devel] Unable to run systemd in an LXC / cgroup container.

Serge Hallyn serge.hallyn at canonical.com
Wed Oct 31 17:34:45 UTC 2012


Quoting Michael H. Warfield (mhw at WittsEnd.com):
> On Mon, 2012-10-29 at 10:18 +0100, Serge Hallyn wrote:
> > Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > ...
> > > Yeah, I don't think I "need to play a game like this" anymore.  I'd have
> > > to go back through some old old E-Mails to see why I did that before.  I
> > > seem to recall we were playing with all sorts of bind mount options for
> > > some PRIVATE thing or another.  It may not be necessary at all any
> > > longer.  IAC, it's minor to switch it back.  I seem to recall switching
> > > back and forth using bind mounts several times back when that got done
> > > that way.
> > > 
> > > I may play with the pre-mount hook just for giggles and see how that
> > > might work as well.  Any idea why I was experiencing the problem with
> > > the mount hook when trying to populate /dev?  I know it wouldn't have
> 
> > The only idea I have is that perhaps your root is MS_SHARED by default?
> > Can you post the script you were using and the container config?
> 
> Another point on the curve...  The documentation says that "pre-mount"
> takes place before the mount occurs and "mount takes place after the
> mount occurs.  Only problem is that "pre-mount" is not being recognized.

I have
serge at serge-ThinkPad-X130e:~$ cat /var/lib/lxc/premount
#!/bin/bash
echo 'hi there' > /tmp/hw
serge at serge-ThinkPad-X130e:~$ head -2 /var/lib/lxc/q4/config
lxc.hook.pre-mount = /var/lib/lxc/premount
lxc.network.type=veth
serge at serge-ThinkPad-X130e:~$ sudo lxc-start -n q4 -d
serge at serge-ThinkPad-X130e:~$ cat /tmp/hw
hi there

(This is using lxc 0.8.0~rc1-4ubuntu39 in ubuntu quantal)

-serge




More information about the lxc-users mailing list