How to fence VM on Proxmox?

Mayank006

Member
Dec 6, 2023
56
0
6
I am using a pacemaker to create a cluster of 3 VMs. Is there a way to initiate a VM reboot automatically when the VM in the cluster fails in the pacemaker.
I am not sure, but it looks like it is possible to use fencing. What are the steps to achieve this in Proxmox?
 
  • Like
Reactions: Kingneutron
I am using a pacemaker to create a cluster of 3 VMs. Is there a way to initiate a VM reboot automatically when the VM in the cluster fails in the pacemaker.
I am not sure, but it looks like it is possible to use fencing. What are the steps to achieve this in Proxmox?

I think you are asking if there's anything like e.g. fence_virsh [1] for libvirt, but instead for PVE.

Short answer: Kind of. There is fence_pve [2], as I have just learnt myself - never tested it.
EDIT: It does not seem something I would want to rely on [2ab]. And (some) staff has no clue about it either [2c]. Those who do, have no time for it.

Expanded answer: If you know the ropes with pacemaker, do not ever bother reading up on the in-house PVE HA stack [2] and run. ;)

[1] https://manpages.debian.org/stretch/fence-agents/fence_virsh.8.en.html
[2] https://manpages.debian.org/stretch/fence-agents/fence_pve.8.en.html
[2a] https://forum.proxmox.com/threads/stonith-fencing-for-guest-vms.23193/
[2b] https://forum.proxmox.com/threads/right-permissions-to-stop-vm-with-fence_pve.26618/
[2c] https://forum.proxmox.com/threads/pacemaker-manage-proxmox-vm.38942/#post-523616
[3] https://pve.proxmox.com/pve-docs/ha-manager.1.html
 
Last edited: