restart VM when not running (properly)

proximity

Member
Jul 19, 2019
48
1
13
50
Is it possible to automatically start a VM when it is not running (properly).

So in case of a shutdown or when it hangs (then it first would need a kill I suppose).
 
Is it possible to automatically start a VM when it is not running (properly).
When it is not running, you can use HA. But how would you define not properly?

So in case of a shutdown or when it hangs (then it first would need a kill I suppose).
This is very much up to your monitoring. Some monitoring solutions allow actions to be taken on certain conditions (eg. triggers).
 
When it is not running, you can use HA. But how would you define not properly?
I assume that with HA you mean https://pve.proxmox.com/wiki/High_Availability_Cluster

That will not work since it's a single machine. I just want the desktop that is running to be restarted if the kvm hangs or when someone shuts it down. (they don't have access to the main machine)

This is very much up to your monitoring. Some monitoring solutions allow actions to be taken on certain conditions (eg. triggers).
Since its a plain desktop I only want a check if the VM is running (not stuck in a way). I thought (hoped) that proxmox would have/has some basic checks for that.
 
Hi
for Container you could use
*/5 * * * * pct start 100 >/dev/null
where 100 is the is of the Desktop, since a Container cant be starte twice, i think this is similar to a vm
 
Hi
for Container you could use
*/5 * * * * pct start 100 >/dev/null
where 100 is the is of the Desktop, since a Container cant be starte twice, i think this is similar to a vm

Thx. I suppose that works when a user shuts down.

Is there also a way to check if a VM is stuck etc and then (re)start it?
 

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!