-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
45 lines (32 loc) · 1.75 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Scripts developed by Nelson Pascoal - work started on 8 August 2011
These scripts have been tested on the following platforms:
lxc 0.7.4 and Ubuntu 11.04
Testing on new platforms to be done as and when required. If you have tested
these scripts, please let us know and contribute your feedback.
Configuration files for containers are assumed to be located in /etc/lxc/<name>.conf,
where <name> is the name of the container. It is important for the correct functioning
of this script that the config file for the container matches the container name.
eg. container test has config file /etc/lxc/test.conf - consequently you would start the
container with the following command: "lxc-start -f /etc/lxc/test.conf -n test". The
script uses this name matching to correctly identify the PID for the container init
process and send the shutdown signal to the correct place.
******** lxc-graceful **********
gracefully shut down a container by issuing an init 0 - done via -SIGPWR signal.
In order to use the script, make sure the following lines are appended to the
/etc/inittab file of your container:
p0::powerfail:/sbin/init 0
Script usage:
lxc-graceful <name>
where <name> is the container name commonly used in combination with --name or
-n commands in standard lxc scripts.
******** lxc-config **********
original script from
http://lxc.sourceforge.net/index.php/about/kernel-namespaces/network/configuration/
configure required dev setup for a new container environment - typically for
environments created using debootstrap.
Script usage:
cd <container_rootfs>
lxc-config
where <container_rootfs> is the root filesystem for the container.
##############################################################################
More scripts will be added when and if required.