pve日常记录

网络 · 2021-08-18 · 1111 人浏览

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
pve

Buy Me a Coffee

支付宝 支付宝
微信 微信
Theme Jasmine by Kent Liao