]> git.proxmox.com Git - mirror_lxcfs.git/blame - README.md
Implement SwapTotal and SwapFree support for /proc/meminfo
[mirror_lxcfs.git] / README.md
CommitLineData
60f73aff
SG
1# lxcfs
2
c397924a 3## Introduction
60f73aff
SG
4FUSE 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
12In other words, it will provide an emulated `/proc` and `/sys/fs/cgroup` folder for the containers.
13
c397924a 14## Usage
758ad80c
SH
15The recommended command to run lxcfs is:
16
c397924a
SG
17 sudo mkdir -p /var/lib/lxcfs
18 sudo lxcfs -s -f -o allow_other /var/lib/lxcfs
758ad80c 19
c397924a
SG
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
ef65395d 24
7456f3b5
SG
25
26In order to use lxcfs with systemd-based containers, you can either use
27LXC 1.1 in which case it should work automatically, or otherwise, copy
1a188fcb
SG
28the lxc.mount.hook file (once built) from this tree to
29/usr/share/lxc/hooks/lxcfs, make sure it is executable, then add the
30following two lines to your container configuration:
5b1e45dd 31```
1a188fcb 32lxc.autodev = 1
ef65395d 33lxc.kmsg = 0
7456f3b5 34lxc.include = /usr/share/lxcfs/00-lxc.conf
5b1e45dd 35```