我在Ubuntu 16.0.4 LTS上运行特权lxc 2.0容器。我将common.config
文件更改sys
为可读写安装:
我改变了原来安装的条目lxc.mount.auto = cgroup:mixed proc:mixed sys:mixed
,以lxc.mount.auto = cgroup:mixed proc:mixed sys:rw
使/sys/
可写。
但是,当我尝试使用以下方法解除绑定设备时:
echo "0003:2965:5023.0004" > unbind (inside /sys/bus/hid/drivers/hid-multitouch)
bash: unbind: Permission denied
看起来/sys/
是不可写的。
谁能告诉我该如何解决?
由于我在这里使用Ubuntu并AppArmor
在系统上进行了配置,因此出现了问题。
在lxc
配置文件中/usr/share/lxc/config/ubuntu.common.conf
,注释如下。取消注释最后一行。
# When using LXC with apparmor, the container will be confined by default.
# If you wish for it to instead run unconfined, copy the following line
# (uncommented) to the container's configuration file.
lxc.aa_profile = unconfined ( ***** UNCOMMENT THIS LINE ******************** )
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句