pve客户机定时启动
必须将crontab中的命令补齐,不能仅用qm,如每日定时启动客户机ID 1000
0 8 * * * /usr/sbin/qm start 1000
容器lxc开启tun-br
pve7主机编辑lxc文件, vi /etc/pve/lxc/2001.conf ,最后加入
systemd.unified_cgroup_hierarchy=0
lxc.cgroup.devices.allow =
lxc.cgroup.devices.deny =
lxc.cgroup2.devices.allow = c 10:200 rwm
lxc.hook.autodev = sh -c "modprobe tun; cd ${LXC_ROOTFS_MOUNT}/dev; mkdir net; mknod net/tun c 10 200; chmod 0666 net/tun"
进入lxc执行,重启后生效
cd /dev
mkdir net
mknod net/tun c 10 200
chmod 0666 net/tun
reboot