restart VM when not running (properly)

proximity

Well-Known Member
Jul 19, 2019
50
1
48
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?