[lxc-users] lxc.hook.pre-start

Serge Hallyn serge.hallyn at ubuntu.com
Wed Feb 25 15:36:53 UTC 2015


Quoting Tamas Papp (tompos at martos.bme.hu):
> 
> On 02/25/2015 06:40 AM, Serge Hallyn wrote:
> >I assume pre-start.sh is executable?
> >
> >Nothing shows up in /tmp/test?
> >
> >If you switch to | tee -a /tmp/test so that output
> >shows up on stdout, does the output then show up in the
> >debug list.
> 
> hi Serge,
> 
> For some reason I thought the path is relative to the container.
> It works fine using $LXC_ROOTFS_PATH .
> 
> 
> However there is another issue.
> 
> Why does it not work from /etc/lxc/lxc.conf?
> As far as I understand default.conf is basically a config file for
> lxc-create, a template for the container specific config file.
> /etc/lxc/lxc.conf is the system configuration, but it doesn't accept
> such a _global_ entry. Is there any way to specify it globally?

/etc/lxc/lxc.conf is global lxc configuration, like a default
lxcpath.  It's not common container configuration.  So yes
/etc/lxc/default.conf is what you'd want to use.  We could
also consider a convention where /etc/lxc/default.conf always
has a lxc.include = /etc/lxc.d or something like that - where
upstream and packages do not touch /etc/lxc.d, and so you can
keep site-local configuration under /etc/lxc.d/.


More information about the lxc-users mailing list