Proxmox VM auto start VM after found in shutdown state Rumi, July 30, 2021July 30, 2021 I was having this strange issue, where a running busy VM stopeed all of a sudden due to high CPU or Memory overload issue. So manually had to start everythime. In order to avoid this, created a small script to start the VM in case if it’s down. #!/bin/bash # Set environment PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin su - if [[ $(qm status 101) = *"status: stopped"* ]]; then echo `qm start 101` fi Proxmox Scripts Proxmox
You can put the script anywhere with the executable permission. What I did later to add it on the cron to check the status in every 5 mins.
To launch automatically you must add with the crontab -e : * * * * * bash [the name of the directory where your script is] example bash /usr/local/sbin/[name of the script]