# PVE 虚拟机为CT容器开启tuntap权限

pve虚拟机安装CT容器,容器内无法使用tuntap设备,需要开启权限

C#
//编辑配置文件
nano /etc/pve/lxc/<CTID>.conf

//末尾加入,开启权限和映射tun设备
lxc.cgroup.devices.allow = c 10:200 rwm
lxc.mount.entry = /dev/net/tun dev/net/tun none bind,create=file

//保存,重启CT容器