User Tools

Site Tools


tips:accessing_dev_mem_for_host_from_lxc_container

This is an old revision of the document!


To Access /dev/mem for Host from container,

Please run the following commands.

<code> lxc stop <container_name> lxc config set <container_name> security.privileged true lxc config set <container_name> raw.lxc 'lxc.cap.drop=' lxc config set <container_name> raw.lxc 'lxc.cap.keep=' lxc config device add <container_name> devmem unix-char source=/dev/mem lxc exec <container_name> dmidecode lxc start <container_name>

You can run these commands when you find the following errors.

/dev/mem: Operation not permitted
tips/accessing_dev_mem_for_host_from_lxc_container.1626262312.txt.gz · Last modified: 2021/07/14 17:01 by navaneeth