]> git.proxmox.com Git - mirror_lxcfs.git/blob - README.md
fb00c2b031841d451590b45b4efd07016edce504
[mirror_lxcfs.git] / README.md
1 # lxcfs
2
3 ## Introduction
4 FUSE filesystem for LXC, offering the following features:
5 - a cgroupfs compatible view for unprivileged containers
6 - a set of cgroup-aware files:
7 - cpuinfo
8 - meminfo
9 - stat
10 - uptime
11
12 In other words, it will provide an emulated `/proc` and `/sys/fs/cgroup` folder for the containers.
13
14 ## Usage
15 The recommended command to run lxcfs is:
16
17 sudo mkdir -p /var/lib/lxcfs
18 sudo lxcfs -s -f -o allow_other /var/lib/lxcfs
19
20 - -s is required to turn off multi-threading as libnih-dbus isn't thread safe.
21 - -f is to keep lxcfs running in the foreground
22 - -o allow\_other is required to have non-root user be able to access the filesystem
23 - -d can also be passed in order to debug lxcfs
24
25
26 In order to use lxcfs with systemd-based containers, you can either use
27 LXC 1.1 in which case it should work automatically, or otherwise, copy
28 the `lxc.mount.hook` and `lxc.reboot.hook` files (once built) from this tree to
29 `/usr/share/lxcfs`, make sure it is executable, then add the
30 following lines to your container configuration:
31 ```
32 lxc.mount.auto = cgroup:mixed
33 lxc.autodev = 1
34 lxc.kmsg = 0
35 lxc.include = /usr/share/lxc/config/common.conf.d/00-lxcfs.conf
36 ```