[lxc-users] Unprivileged containers do not auto-start

Serge Hallyn serge.hallyn at ubuntu.com
Tue May 6 21:01:34 UTC 2014


Quoting Robert Pendell (shinji at elite-systems.org):
> OS: Ubuntu 14.04 LTS x86_64
> Kernel: Host-Supplied 3.14.1
> Provider: Linode
> Host Virtualization: Xen Paravirtualized
> LXC Version: 1.0.3-0ubuntu3
> 
> On a fresh boot unprivileged containers are not starting automatically
> even though they have lxc.start.auto enabled.  lxc-ls as the user
> confirms autostart is enabled as well.
> 
> Is this a bug or intended or am I just missing something really
> obvious in my configuration?

By default only containers in /var/lib/lxc are autostarted.  You
could edit /etc/lxc/lxc.conf to change that.  If you're ok with
them only starting on login you might also be able to use a user
upstart session job, but I suspect tying the containers so closely
to your login session won't be what you want.

> Config:
> shinji at icarus:~$ cat ~/.local/share/lxc/gateone/config
> # Template used to create this container: /usr/share/lxc/templates/lxc-download
> # Parameters passed to the template:
> # For additional config options, please look at lxc.conf(5)
> 
> # Distribution configuration
> lxc.include = /usr/share/lxc/config/centos.common.conf
> lxc.include = /usr/share/lxc/config/centos.userns.conf
> lxc.arch = x86
> 
> # Container specific configuration
> lxc.id_map = u 0 100000 65536
> lxc.id_map = g 0 100000 65536
> lxc.rootfs = /home/shinji/.local/share/lxc/gateone/rootfs
> lxc.utsname = gateone
> 
> # Network configuration
> lxc.network.type = veth
> lxc.network.link = lxcbr0
> lxc.network.flags = up
> 
> # Fixed mac address for static assignment via dnsmasq on host
> lxc.network.hwaddr = 62:A9:A7:57:D2:CC
> 
> # Autostart baby!
> lxc.start.auto = 1
> 
> Robert Pendell
> shinji at elite-systems.org
> A perfect world is one of chaos.
> _______________________________________________
> 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