On Wed, 2014-10-29 at 06:46 +0000, C. L. Martinez wrote:
> Hi all,
> 
>  I have installed some lxc containers under a CentOS7 host (5 CentOS
> based and 3 Ubuntu). All works ok, but I need to start automatically
> some of these containers when host reboots or it is restarted.
> 
>  Are these the correct steps?

> a) Enable lxc service: systemctl enable lxc.service

> b) Reconfigure lxc container config file with the following options:

> # Autostart
> lxc.start.auto = 1
> lxc.start.delay = 5

> lxc.start.order = 100

lxc.start.order is not required unless you are doing strict prioritized
ordering.

Also be careful about lxc.group.  If your container is a member of any
group, it must also be a member of the "onboot" group or it will be
ignored by the scripts by default.  By default, the helper scripts will
start members of the "onboot" group first and then any containers that
are not a member of any group.  That too is configurable.

I would add...

lxc.group = onboot

Just to be sure.

I know it seems to be somewhat redundant to specify "lxc.start.auto = 1"
and "lxc.group = onboot" but it's there for some corner cases with group
memberships.

> Am I right??

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  [email protected]
   /\/\|=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!

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to