Script to automatically migrate stopped/failed VMs?

edd

New Member
Sep 19, 2025
22
1
3
If I understand correctly, HA only migrates VMs if a node is hard down or otherwise loses connectivity.

Is there a script or some other tool to automatically restart and/or migrate stopped/failed VMs?

Example use case: Node is up and works normally, but local VM storage is down.
 
Hi @edd ,

The last few words in your question are critical to the outcome in your situation. If your VM is using local storage and that storage is gone - there is no way for HA system to migrate/recover it. You'd need a pre-existing replication in place, i.e. ZFS replication.

Running HA solution with local storage is generally not a good approach. In non-local storage case, you are better off creating your own script that checks VM and application status before it initiates a migration event.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Yes, the question assumes ZFS local storage replicated to the other nodes. I’m sorry I wasn’t explicit about that.

In other words, the other nodes have all the required data and can take over. The problem is that HA does not consider a critical local storage failure enough of an offense to fence off the node.

So, I need a method to sequester the ailing node in order for HA failover to kick in. Ideally this kind of watchdog functionality would be part and parcel of the base Proxmox install, but it is not, so here we are.
 
NAS, SAN, etc.
Whether one is more lightweight than the other is in the eye of the beholder.
Yeah, I don’t think any of those options qualify as a lightweight option when all you have is three nodes and some wishful thinking.

Especially if you don’t just want to create another single point of failure.
 
Yeah, I don’t think any of those options qualify as a lightweight option when all you have is three nodes and some wishful thinking.

Especially if you don’t just want to create another single point of failure.
Different strokes for different folks :-)


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
  • Like
Reactions: edd