[lxc-users] lxc.hook.start not working?

Fajar A. Nugraha list at fajar.net
Wed Mar 4 22:36:21 UTC 2015


On Thu, Mar 5, 2015 at 2:52 AM, Anjali Kulkarni <anjali at juniper.net> wrote:
> Thanks, that does not work either.
> Is this broken?

Works for me.

Try "lxc-start -o /tmp/lxc-start.log -l debug -n container_name", and
then read the log file. Mine says

...
      lxc-start 1425508479.812 INFO     lxc_cgmanager -
cgmanager.c:cgm_setup_limits:1257 - cgroup limits have been setup
      lxc-start 1425508479.812 INFO     lxc_apparmor -
lsm/apparmor.c:apparmor_process_label_set:187 - changed apparmor
profile to lxc-container-default
      lxc-start 1425508479.812 INFO     lxc_conf -
conf.c:run_script_argv:345 - Executing script '/root/start.sh' for
container 'v', config section 'lxc'
      lxc-start 1425508479.817 NOTICE   lxc_start - start.c:start:1232
- exec'ing '/sbin/init'
      lxc-start 1425508479.817 NOTICE   lxc_start -
start.c:post_start:1243 - '/sbin/init' started with pid '2506'
...

/root/start.sh is under container rootfs, an executable shell script.
My guess is you're missing something simple like "chmod 700"

-- 
Fajar


More information about the lxc-users mailing list