From 5b1acc5d8ffe291583a3c64d92b0dc16bd928fa7 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Sun, 14 Aug 2011 16:13:41 +0200 Subject: [PATCH] lxc: Add configuration for template container. 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 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 var/lib/lxc/template/config diff --git a/var/lib/lxc/template/config b/var/lib/lxc/template/config new file mode 100644 index 0000000..48899db --- /dev/null +++ b/var/lib/lxc/template/config @@ -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 -- 2.30.2