Update proxmox-SHUTDOWN-RUNNING-VMS.sh

This commit is contained in:
kneutron 2024-03-02 12:16:13 -07:00 committed by GitHub
parent 0a405856a8
commit 7a882f4d86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -20,8 +20,8 @@ lastcpu=$(grep processor /proc/cpuinfo |tail -n 1 |awk '{print $3}')
[ -e "$VM_LIST" ] && rm -f "$VM_LIST" # delete the old file ONLY IF it exists
for vmid in $(qm list |grep running |awk '{print $1}'); do
# echo "qm shutdown $vmid" >>"$VM_LIST"
echo "qm suspend $vmid --todisk" >>"$VM_LIST"
echo "qm shutdown $vmid" >>"$VM_LIST"
# echo "qm suspend $vmid --todisk" >>"$VM_LIST"
done
echo "$(date) - HIBER ALL VMS using $lastcpu threads"