[lxc-users] lxc-autostart in Centos 7

Fajar A. Nugraha list at fajar.net
Thu Apr 28 07:09:32 UTC 2016

On Thu, Apr 28, 2016 at 11:54 AM, Saint Michael <venefax at gmail.com> wrote:
> In Ubuntu you boot the box and all the containers marked for auto-start
> do start. In Centos 7 they do not.
> I have been using /etc/rc.local but it does create an issue when the machine
> reboots, for Centos hangs there for several minutes.
> Any idea how to make Centos work as well as Ubuntu for LXC, both 2.0 and
> earlier versions?

It depends on who provide your packages, or how you build it.

In my C6, self-packaged, I ended up with /etc/rc.d/init.d/lxc, so
enabling autostart is a matter of "chkconfig lxc-net on" and
"chkconfig lxc on"

For C7, you could probably try "systemctl status lxc" and "systemctl
status lxc-net". If it says disabled, enable it.


More information about the lxc-users mailing list