]>
Commit | Line | Data |
---|---|---|
60f73aff SG |
1 | # lxcfs |
2 | ||
c397924a | 3 | ## Introduction |
60f73aff SG |
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 | |
758ad80c | 11 | |
955ce662 FM |
12 | In other words, it will provide an emulated `/proc` and `/sys/fs/cgroup` folder for the containers. |
13 | ||
c397924a | 14 | ## Usage |
758ad80c SH |
15 | The recommended command to run lxcfs is: |
16 | ||
c397924a | 17 | sudo mkdir -p /var/lib/lxcfs |
40dd7f1b | 18 | sudo lxcfs /var/lib/lxcfs |
7456f3b5 SG |
19 | |
20 | In order to use lxcfs with systemd-based containers, you can either use | |
21 | LXC 1.1 in which case it should work automatically, or otherwise, copy | |
77647bf9 EG |
22 | the `lxc.mount.hook` and `lxc.reboot.hook` files (once built) from this tree to |
23 | `/usr/share/lxcfs`, make sure it is executable, then add the | |
24 | following lines to your container configuration: | |
5b1e45dd | 25 | ``` |
77647bf9 | 26 | lxc.mount.auto = cgroup:mixed |
1a188fcb | 27 | lxc.autodev = 1 |
ef65395d | 28 | lxc.kmsg = 0 |
77647bf9 | 29 | lxc.include = /usr/share/lxc/config/common.conf.d/00-lxcfs.conf |
5b1e45dd | 30 | ``` |