How to start a VM permanently.

llorenzogo

New Member
Aug 22, 2022
2
0
1
Hi there!

i have a VM that is used by a lot of users and sometimes someone accidentally shutdown the server. Does anybody knows how can I configure Proxmox to auto start the VM?

Kind regards!!
Leo.
 
Hi, but what I need is not to start when the whole proxmox boot, I need it to start when the vm is down.
 
Hi, but what I need is not to start when the whole proxmox boot, I need it to start when the vm is down.
You can check whether the VM is running with the qm command and you can start the VM if it is not running: qm status 100 | grep -q 'stopped' && qm start 100. You could automate this to run every minute in a cron-job.
Or you can create a hookscript to start the VM when it is shut down. In both cases you might want to check if the Proxmox host is shutting down first.
 
Last edited:
  • Like
Reactions: ciipher
What about enabling HA? If the VM is shutdown from inside, it should be started right away as only shutting it down via Proxmox VE tooling (from the outside) would change the desired HA state of the VM
 
Assuming it's a windows system, you can set the permissions/policies to prevent UNAUTHORIZED users from shutting down the system. I guess it can be done on linux as well.
 
Last edited:

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!