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

Serge Hallyn serge.hallyn at canonical.com
Wed Dec 5 21:59:24 UTC 2012


Quoting John (lxc at jelmail.com):
> On 05/12/12 14:55, Michael H. Warfield wrote:
> [...]
> >> Ah yes, the "pivot root" problem. I have worked around this for the time
> >> being by doing a "mount --make-rprivate /". I created a systemd service
> >> on the host as an "after" dependency on "systemd-remount-fs.service" to
> >> do this. I believe this is ok in the short term (it appears to work ok
> >> for me).
> > Hmmm...  I was thinking someone ran into some problems doing that and
> > causing problems with the /dev/pts mounts or some such.  Good to note if
> > that worked for you.  I'm about to start playing with Fedora 18 Beta
> > where I expect problems.  I'll try that out.
> >
> >> If I rebuild lxc from git, should I then expect my existing systemd
> >> container to work or is there anything else that I need to do ?
> > Yeah, one other thing (in addition to following Serge's advice regarding
> > git and #stage)...
> >
> > You have to add an option to the config file for your systemd
> > containers.
> >
> > lxc.autodev = 1
> 
> Ok got that. I used git://github.com/lxc/lxc.git #staging. Built and 
> installed ok. Existing containers running. When I try to create a new 
> one, with or without the autodev like you suggest, I get the below:
> 
> # lxc-create -n test2 -f test2.conf
> lxc-create: unknown template ''
> lxc-create: aborted

You have to specify a template, i.e. '-t debian'.




More information about the lxc-users mailing list