[Lxc-users] [Spam-Wahrscheinlichkeit=87] Restarting LXC containers after power failure

Jäkel, Guido G.Jaekel at dnb.de
Mon May 6 13:44:08 UTC 2013


Dear David,

this will require to persist the current "power state" of a container by some kind of marker.  A tricky way is to mark some container-related file, e.g. to ("miss"-) use the sticky bit of the containers lxc configuration file or to put some marker file into the containers rootfs.

This will allow to write an init script that will scan for such a marker and (re)start the corresponding container. Using LXC's startup/shutdown hook scripts, you may event set such a marker automagical and especially to remove it on a regular shutdown. 



>-----Original Message-----
>From: David Parks [mailto:david.parks at frugg.com]
>Sent: Monday, May 06, 2013 2:59 PM
>To: lxc-users at lists.sourceforge.net
>Cc: Ha Ho
>Subject: [Spam-Wahrscheinlichkeit=87][Lxc-users] Restarting LXC containers after power failure
>
>We just had a datacenter power failure, upon restart of course our LXC containers were stopped. It would be just dandy if there were an
>LXC option to restart the containers that were already running before the sudden failure.
>
>
>
>Is there any such capability?





More information about the lxc-users mailing list