lxc: Add configuration for template container.
authorMatthijs Kooijman <matthijs@stdin.nl>
Sun, 14 Aug 2011 14:13:41 +0000 (16:13 +0200)
committerMatthijs Kooijman <matthijs@stdin.nl>
Sun, 14 Aug 2011 14:19:17 +0000 (16:19 +0200)
This container will serve as a template for other containers. The
configuration is generated using lxc-create using the "debian" template.

var/lib/lxc/template/config [new file with mode: 0644]

diff --git a/var/lib/lxc/template/config b/var/lib/lxc/template/config
new file mode 100644 (file)
index 0000000..48899db
--- /dev/null
@@ -0,0 +1,23 @@
+lxc.tty = 4
+lxc.pts = 1024
+lxc.rootfs = /var/lib/lxc/template/rootfs
+lxc.cgroup.devices.deny = a
+# /dev/null and zero
+lxc.cgroup.devices.allow = c 1:3 rwm
+lxc.cgroup.devices.allow = c 1:5 rwm
+# consoles
+lxc.cgroup.devices.allow = c 5:1 rwm
+lxc.cgroup.devices.allow = c 5:0 rwm
+lxc.cgroup.devices.allow = c 4:0 rwm
+lxc.cgroup.devices.allow = c 4:1 rwm
+# /dev/{,u}random
+lxc.cgroup.devices.allow = c 1:9 rwm
+lxc.cgroup.devices.allow = c 1:8 rwm
+lxc.cgroup.devices.allow = c 136:* rwm
+lxc.cgroup.devices.allow = c 5:2 rwm
+# rtc
+lxc.cgroup.devices.allow = c 254:0 rwm
+
+# mounts point
+lxc.mount.entry=proc /var/lib/lxc/template/rootfs/proc proc nodev,noexec,nosuid 0 0
+lxc.mount.entry=sysfs /var/lib/lxc/template/rootfs/sys sysfs defaults  0 0