Starting a VM in Proxmox without Quorum

Kovasky Buezo | Nov 1, 2023 min read

edited on: May 17, 2024

Intro

One of the nodes in my lab runs PfSense and if the vm is down, my network is down. This prevents my nodes from reaching quorum, and thus preventing PfSense from starting. To solve this, I needed a way for the vm to start without quorum. This was achieved by creating a oneshot service that runs at system startup.

Create the script

Create a script in a folder of your choice, like /root/startPfSense.sh.

Place the following inside it, replacing the vmID for the id of the vm you want to start:

#!/bin/bash

sleep 5
systemctl stop pve-cluster
pmxcfs -l
qm start $vmID
sleep 5
killall pmxcfs
systemctl start pve-cluster

After this, make sure to give it the proper permissions to make it executable.

Create the service file

Now, create a service file like /etc/systemd/system/startPfSense.service and using a text editor add the following:

[Unit]
Description=Start PfSense without quorum
After=pve-cluster.service

[Service]
type=oneshot
ExecStart=/root/startPfSense.sh

[Install]
WantedBy=multi-user.target

Enabling the service

To enable the service, you would do systemctl daemon-reload and later systemctl enable startPfSense.service. To check the status of the service, you would run systemctl status startPfSense.

Done!

Now, your vm will be started on your next reboot.