Proxmox uses corosync for its clustering technology. The solution requires an odd number of cluster nodes. In production environments, this is easy to achieve by deploying at least 3 nodes, and any following expansion will add 2 nodes each time.
But there are situations like a home lab, where people would like to use the absolute minimum numbers of nodes, that is 2. But then, in a failure like a network segmentation each node would believe it’s the one alive and that it was the other node that went offline. This situation is called split brain: there is no majority vote between the nodes, and so there’s no way to promote any of them to be the primary one.
For home labs, we can create a machine running the Qdevice, a witness that contributes to the cluster vote but without running the whole PVE solution.
First, I create a Linux machine. Depending on the situation, this can be a virtual machine (please don’t put it inside the cluster for which it has to be a witness!), a raspberry PI, or a proper physical server. In a lab, this is usually a virtual machine.
In my lab I create a Ubuntu machine, and after installing and configuring it, I install the Qdevice component:
sudo apt install corosync-qnetd corosync-qdevice
Then, because in my case it’s Ubuntu, I need to enable root login and set a password:
sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config sudo systemctl restart ssh sudo passwd
Then, on the two Proxmox nodes I also install the qdevice components:
sudo apt install corosync-qdevice
This is not enough. If I check the status of the cluster using the pvecm status command I see this:

As you can notice, there are only the two PVE nodes.
To add the qdevice to the cluster, in one of the proxmox nodes I run this command:
To add the qdevice to the cluster, in one of the proxmox nodes I run this command:
pvecm qdevice setup 172.27.217.181
Where .181 is the ip address of the qdevice. If I then check again the status of the cluster, I see this:
We now have 3 nodes, each bringing one vote, so that we can have a quorum of 2 out of 3, avoiding split brain.
Interesting fact, if at some point a cluster has an odd number of PVE nodes plus the qdevice, this one has two votes, to maintain an odd amount of votes.