Description of problem: Libvirt creates a new IPC namespace in containers which resets any IPC values set on the host side (such as kernel.shmmax) and mounts a new /proc readonly which won't allow kernel.shmmax (or any other sysctl) to be changed inside the container. This is a problem for applications, such as PostgreSQL (prior to version 9.3), which require a lot of sysv shared memory. # sysctl -w kernel.shmmax=1000000000 error: "Read-only file system" setting key "kernel.shmmax" Version-Release number of selected component (if applicable): libvirt-1.1.2-1.fc20
I have been able to work around this be remounting proc/sys read-writeable: sudo mount -o remount rw /proc/sys
This is basically by design. More info in this docker discussion which more or less applies to libvirt lxc as well. https://github.com/docker/docker/issues/10176 Their suggestion is to change the shmmax value on the host