PVE设置定时关闭、启动虚拟机
PVE设置定时关闭、启动虚拟机
pvesh create /nodes/{nodename}/qemu/{vmid}/status/shutdown
#其中nodename为节点名称,vmid为虚拟机编号。
#start
10 2 * * 1,5 pvesh create /nodes/yuxi2/qemu/100/status/start
15 2 * * 1,5 pvesh create /nodes/yuxi2/qemu/101/status/start
20 2 * * 1,5 pvesh create /nodes/yuxi2/qemu/102/status/start
25 2 * * 1,5 pvesh create /nodes/yuxi2/qemu/103/status/start
30 2 * * 1,5 pvesh create /nodes/yuxi2/qemu/104/status/start
35 2 * * 1,5 pvesh create /nodes/yuxi2/qemu/105/status/start
10 4 * * 1,5 pvesh create /nodes/yuxi2/qemu/106/status/start
10 5 * * 1,5 pvesh create /nodes/yuxi2/qemu/107/status/start
10 6 * * 1,5 pvesh create /nodes/yuxi2/qemu/108/status/start
10 7 * * 1,5 pvesh create /nodes/yuxi2/qemu/109/status/start
10 8 * * 1,5 pvesh create /nodes/yuxi2/qemu/110/status/start
10 9 * * 1,5 pvesh create /nodes/yuxi2/qemu/111/status/start
#stop
10 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/100/status/stop
12 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/101/status/stop
14 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/102/status/stop
16 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/103/status/stop
18 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/104/status/stop
20 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/105/status/stop
22 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/106/status/stop
24 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/107/status/stop
26 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/108/status/stop
28 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/109/status/stop
30 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/110/status/stop
32 0 * * 1,5 pvesh create /nodes/yuxi2/qemu/111/status/stopPVE设置定时关闭、启动虚拟机
https://blog.883051.xyz/archives/pveshe-zhi-ding-shi-guan-bi-qi-dong-xu-ni-ji