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