Skip to content

Server tools used to manage lxc: start/stop/status on containers, allow containers to reboot / stop from inside

Notifications You must be signed in to change notification settings

llange/LXC-Management-Tools

Repository files navigation

A init.d script for stating / (cleanly) stopping LXC containers on Fedora (maybe RedHat, not tested)
Also, a mechanism to allow a LXC container to shutdown itself.

Credits goes to :
* LXC Howto : Dwight Schauer <[email protected]> http://lxc.teegra.net/
	/etc/rc.d/init.d/lxc script (originally for Arch Linux, ported to Fedora)
* Brian K. White - [email protected] http://nj10.aljex.com/lxc/ http://download.opensuse.org/repositories/home:/aljex/openSUSE_11.2/src/lxc-0.6.5-46.1.src.rpm http://blog.flameeyes.eu/2009/08/08/linux-containers-and-the-init-scripts-problem#comments http://blog.flameeyes.eu/2009/08/10/some-more-notes-about-linux-containers#comments
	OpenSuse scripts for managing LXC containers + mechanism allowing a LXC container to shutdown itself


For Fedora LXC Containers, add the following file to "/etc/events.d/":

============================================= /etc/events.d/lxc =============================================
# power-status-changed - External signaling for LXC
#
# This task is run whenever the PWR signal is received.
# Usually used to shut down the machine.

start on power-status-changed

script
/usr/bin/logger -t LXC "System shutdown requested"
/sbin/shutdown -h now "Power status changed"
end script
=============================================================================================================

About

Server tools used to manage lxc: start/stop/status on containers, allow containers to reboot / stop from inside

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published