On 03/03/2015 07:22 AM, Fajar A. Nugraha wrote:
On Tue, Mar 3, 2015 at 1:15 PM, Tamas Papp <[email protected]> wrote:


On March 3, 2015 12:03:06 AM Anjali Kulkarni <[email protected]> wrote:

I tried to add a lxc.hook.start, and pointing to a simple script.
However, on trying to start the container I get this error:

lxc-start -n c8
lxc-start: invalid sequence number 1. expected 4
lxc-start: failed to spawn Œc8'
lxc-start: Device or resource busy - cgroup_rmdir: failed to delete
/cgroup/lxc/c8

This is all I added in the config:

lxc.hook.start = /var/lib/lxc/c8/rootfs/home/ubuntu/tmp.sh

Also, the tmp.sh is definitely there in container rootfs, so why does not
not work?

It has not yo be under the rootfs, but anywhere.
The right keyword is lxc.hook.pre-start or something else based on your
needs. Check the manual for the options.

man lxc.container.conf

        lxc.hook.start
               A hook to be run in the container's namespace
immediately before executing the container's init. This requires the
program to be available in the  con‐
               tainer.


@Anjali: assuming your file is executable, try

lxc.hook.start = /home/ubuntu/tmp.sh

Oops, my bad, sorry.
I was confused by lxc.hook,pre-start + lxc.start.auto :)


tamas

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to