How to keep the VM boot state is not shut down?

First I would try to prevent that in the guests OS. Like removing the interface buttons for a shutdown.

And wouldn't be that hard to write a bash script that runs on the server using cron and checks if a VM is shutdown and if it finds one that should be running it could start it.

You just would need to have a list of VMIDs that should always be running, step through that list all 5 minutes or so and then use qm status <VMID> to check if the VM is running, if it is not it could be started with qm start <VMID>.

Edit:
Something like:
Code:
#!/bin/bash

VMIDLIST=(100 101 102 103) # list of VMIDs that should always be running

for vmid in ${VMIDLIST[*]}
do
    if [ $(qm status $vmid) == "status: stopped" ]; then
        qm start $vmid
    fi
done
 
Last edited:
For Win10 you can remove it using policies like for example described here. I guess for Win11 there should be something similar.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!