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

Michael H. Warfield mhw at WittsEnd.com
Thu Oct 25 19:42:54 UTC 2012


On Thu, 2012-10-25 at 14:02 -0500, Serge Hallyn wrote:
> Quoting Michael H. Warfield (mhw at WittsEnd.com):
> > On Thu, 2012-10-25 at 13:23 -0400, Michael H. Warfield wrote:
> > > Hey Serge,
> > > 
> > > On Thu, 2012-10-25 at 11:19 -0500, Serge Hallyn wrote:
> > 
> > ...
> > 
> > > > Oh, sorry - I take back that suggestion :)
> > > 
> > > > Note that we have mount hooks, so templates could install a mount hook to
> > > > mount a tmpfs onto /dev and populate it.
> > > 
> > > Ok...  I've done some cursory search and turned up nothing but some
> > > comments about "pre mount hooks".  Where is the documentation about this
> > > feature and how I might use / implement it?  Some examples would
> > > probably suffice.  Is there a require release version of lxc-utils?
> > 
> > I think I found what I needed in the changelog here:
> > 
> > http://www.mail-archive.com/lxc-devel@lists.sourceforge.net/msg01490.html
> > 
> > I'll play with it and report back.

> Also the "Lifecycle management hooks" section in
> https://help.ubuntu.com/12.10/serverguide/lxc.html

This isn't working...

Based on what was in both of those articles, I added this entry to
another container (Plover) to test...

lxc.hook.mount = /var/lib/lxc/Plover/mount

When I run "lxc-start -n Plover", I see this:

[root at forest ~]# lxc-start -n Plover
lxc-start: unknow key lxc.hook.mount
lxc-start: failed to read configuration file

I'm running the latest rc...

[root at forest ~]# rpm -qa | grep lxc
lxc-0.8.0.rc2-1.fc16.x86_64
lxc-libs-0.8.0.rc2-1.fc16.x86_64
lxc-doc-0.8.0.rc2-1.fc16.x86_64

Is it something in git that hasn't made it to a release yet?

> Note that I'm thinking that having lxc-start guess how to fill in /dev
> is wrong, because different distros and even different releases of the
> same distros have different expectations.  For instance ubuntu lucid
> wants /dev/shm to be a directory, while precise+ wants a symlink.  So
> somehow the template should get involved, be it by adding a hook, or
> simply specifying a configuration file which lxc uses internally to
> decide how to create /dev.

I agree this needs to be by some sort of convention or template that we
can adjust.

> Personally I'd prefer if /dev were always populated by the templates,
> and containers (i.e. userspace) didn't mount a fresh tmpfs for /dev.
> But that does complicate userspace, and we've seen it in debian/ubuntu
> as well (i.e. at certain package upgrades which rely on /dev being
> cleared after a reboot).
> 
> -serge

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 985-6132 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20121025/7ecc0253/attachment.pgp>


More information about the lxc-users mailing list