无法取消绑定特权lxc容器中的设备

蒙库

我在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] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章