proxmox-management/manage_autostart

28 lines
442 B
Text
Raw Permalink Normal View History

2023-10-26 16:45:29 +02:00
#!/bin/sh
set -e
PARAM=$1
qm list | tail -n +2 | awk '{ print $1 }' | while read vmid
do
case $PARAM in
0|1)
qm set $vmid --onboot $PARAM
;;
"")
qm config $vmid | grep -e onboot: -e name:
;;
*)
cat << EOF
usage: manage autostart behaviour of vms on node
$0 show autstart state for alle vms on node
$0 <0|1> disables or enables autostart for all vms on node
$0 help this help
EOF
exit 1
;;
esac
done