[lxc-users] Unprivileged Container Autostart

Mike Bernson mike at mlb.org
Sat Jan 3 20:09:35 UTC 2015


on Ubuntu I created a upstart conf to handle it

Here is the upstart file I use:
description "start unpriv containers"

start on started lxc

script
     USERS="mike"

     for u in $USERS; do
         cgm create all lxc$u
         cgm chown all lxc$u $(id -u $u) $(id -g $u)
         lxc-autostart -L -P /home/$u/.local/share/lxc | while read line;
  do
             set -- $line
             /usr/local/bin/startunprivlxc lxc$u $u $1
             sleep $2
         done
     done
end script


On 01/03/2015 12:17 PM, Nicholas J Ingrassellino wrote:
> I am trying to get unprivileged containers to autostart without success. The built-in mechanisms do not work nor does cron. I have Google'ed and found many people with the same issue but no solution.
>
> Since this is such a common issue I take it there is no solution currently? That sounds odd to me but after pages and pages of search results no one seems to have figured it out.
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list