[lxc-users] Starting & Stoping groups of containers
Michael H. Warfield
mhw at WittsEnd.com
Wed May 14 15:53:10 UTC 2014
On Wed, 2014-05-14 at 12:57 +0200, Marcel Sánchez Toledano wrote:
> Hi again,
>
>
> I have created some containers with the this option in the config
> file:
>
>
> lxc.group = scenario1
>
>
> But I can't find the way to stop, start or destroy all the containers
> at the same time by group. Is this possible? Or I just can use the
> group option in the comand lxc-autostart -g scenario1?
Yes, you can use "lxc-autostart -g "groups" to start and stop groups of
containers but you also either have to use the -A option (not generally
recommended) or add the following option to the individual config files
as well:
lxc.start.auto = 1
Optionally, you can set the boot order in the group using
lxc.start.order and a delay after each container begins to initialize
with lxc.start.delay. Starting 10 or 20 container all at once can be
rather (cough) harsh on the load average. :-P
You can not destroy them as a group, though.
I'm working on code to assist with and control the autoboot process
using this mechanism when the host boots. Currently, it will only
autoboot containers that are not contained within any group at the time
the host boots.
> Thanks for the help, again!
>
>
> Marcel Sánchez Toledano
Regards,
Mike
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
ARIN whois: ARIN-MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
--
Michael H. Warfield (AI4NB) | (770) 978-7061 | mhw at WittsEnd.com
/\/\|=mhw=|\/\/ | (678) 463-0932 | http://www.wittsend.com/mhw/
ARIN whois: ARIN-MHW9 | An optimist believes we live in the best of all
PGP Key: 0x674627FF | possible worlds. A pessimist is sure of it!
More information about the lxc-users
mailing list