On Mon, Jun 09, 2014 at 11:30:38AM -0400, Shidan wrote: > BTW, I'm trying this in ubuntu 14.04. This is my lxc-ls output after > running lxc-autostart as the user that owns the container: > > NAME STATE IPV4 IPV6 AUTOSTART > -------------------------------------- > test1 STOPPED - - NO > > So given that I put this: > > lxc.start.auto = 1 > lxc.start.delay = 5 > > In ~/.config/lxc/default.conf and I have rebooted the machine, is there > anything else I should be doing to get lxc-autostart working?
default.conf is only used at the base config for new containers. Changing it will have no effect to existing containers. So you should edit ~/.local/share/lxc/test1/config and add those two lines in there, then the container will show up as auto-started in lxc-ls and lxc-autostart will work. > > > On Mon, Jun 9, 2014 at 11:16 AM, Stéphane Graber <stgra...@ubuntu.com> > wrote: > > > > On Mon, Jun 09, 2014 at 10:57:13AM -0400, Michael H. Warfield wrote: > > > On Mon, 2014-06-09 at 10:46 -0400, Shidan wrote: > > > > I tried it both in the individual configuration files and the main > > > > one. I actually can't get lxc-autostart to work even in a session as > > > > the user that owns the container right now and lxc-ls is not > > > > recognizing the options in the config file. > > > > > > Yeah, I strongly suspect you're not going to get lxc-autostart to work > > > in a session due to what I found yesterday. Stéphane and I are going to > > > have to work something out, especially if I work on some changes to how > > > lxcpath is parsed and managed, but that's all going to be a ways off. > > > IAC, I think it's broken outside of using the host global lxcpath right > > > now. > > > > As I said earlier, I believe those are two entirely separate problems... > > > > lxc-autostart as an unprivileged user itself works great: > > > > stgraber@dakara:~$ lxc-ls -f > > NAME STATE IPV4 IPV6 GROUPS AUTOSTART > > ----------------------------------------------------- > > nsec-internet STOPPED - - a, d NO > > precise-gui STOPPED - - - NO > > utopic STOPPED - - - YES > > > > stgraber@dakara:~$ lxc-autostart > > > > stgraber@dakara:~$ lxc-ls -f > > NAME STATE IPV4 IPV6 GROUPS AUTOSTART > > ----------------------------------------------------- > > nsec-internet STOPPED - - a, d NO > > precise-gui STOPPED - - - NO > > utopic RUNNING - - - YES > > stgraber@dakara:~$ > > > > > > > > > > > > Regards, > > > Mike > > > > > > > On Mon, Jun 9, 2014 at 10:36 AM, Michael H. Warfield > > > > <m...@wittsend.com> wrote: > > > > Stéphane, > > > > > > > > On Mon, 2014-06-09 at 10:12 -0400, Stéphane Graber wrote: > > > > > On Mon, Jun 09, 2014 at 10:07:05AM -0400, Shidan wrote: > > > > > > I now am trying to get an unprivilaged container to > > > > auto-start, I put the > > > > > > following in ~/.config/lxc/default.conf: > > > > > > > > > > > > lxc.start.auto = 1 > > > > > > lxc.start.delay = 5 > > > > > > > > > > > > > > > > > > I also tried putting it in the main /etc/lxc/default.conf > > > > file. For both > > > > > > cases it doesn't work and lxc-ls --fancy shows the > > > > autostart flag as NO. > > > > > > > > > For this to work, you need something to call "lxc-autostart" > > > > at session > > > > > open time. For privileged containers we have an init script > > > > doing that, > > > > > but for unprivileged users, there's no single way of doing > > > > it and it's > > > > > hard to know exactly what the user would want to see happen > > > > (have all > > > > > user containers started at boot time and exit at shutdown > > > > time or have > > > > > that happen at user session open time but then what about > > > > ssh sessions, > > > > > ...). > > > > > > > > > > > > I think there's also a problem in the way lxc-autostart is > > > > handling the > > > > -P option(s) that would complicate this for user based > > > > containers > > > > outside of the global lxcpath. See my message over in the > > > > -devel list. > > > > > > > > Mike > > > > -- > > > > Michael H. Warfield (AI4NB) | (770) 978-7061 | > > > > m...@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! > > > > > > > > > > > > > > > > _______________________________________________ > > > > lxc-users mailing list > > > > lxc-users@lists.linuxcontainers.org > > > > http://lists.linuxcontainers.org/listinfo/lxc-users > > > > > > > > > > > > > > > > -- > > > > This message has been scanned for viruses and > > > > dangerous content by MailScanner, and is > > > > believed to be clean. > > > > _______________________________________________ > > > > lxc-users mailing list > > > > lxc-users@lists.linuxcontainers.org > > > > http://lists.linuxcontainers.org/listinfo/lxc-users > > > > > > -- > > > Michael H. Warfield (AI4NB) | (770) 978-7061 | m...@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! > > > > > > > > > > > > _______________________________________________ > > > lxc-users mailing list > > > lxc-users@lists.linuxcontainers.org > > > http://lists.linuxcontainers.org/listinfo/lxc-users > > > > > > -- > > Stéphane Graber > > Ubuntu developer > > http://www.ubuntu.com > > > > _______________________________________________ > > lxc-users mailing list > > lxc-users@lists.linuxcontainers.org > > http://lists.linuxcontainers.org/listinfo/lxc-users > _______________________________________________ > lxc-users mailing list > lxc-users@lists.linuxcontainers.org > http://lists.linuxcontainers.org/listinfo/lxc-users -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: Digital signature
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users