Proxmox Cluster and Datacenter Configuration

Setting up a Proxmox cluster and Proxmox Datacenter Manager.

Introduction

I am setting up another Proxmox server and making a cluster with my current one. I will then install and setup Proxmox Data Center to have a dashboard to view my Proxmox environment.


Setting up the Cluster

Main Node Config

On the main node, you will want to create the cluster. In order to do that, run the command:

pvecm create homelab

It will show something like this:

Image

To confirm that it was created properly, send the command:

pvecm status

This will show only one node (your primary):

Image

Node 2 Config

Since Node 1 created the cluster, you will need to join node 2 to it. While accessing the CLI of node 2, run the command with 172.16.1.24 being the IP of your primary node or node 1:

pvecm add 172.16.1.24

You should see something like “Successfully added node 'pve2' to cluster."

Image

To verify, run:

pvecm nodes

You should see both your primary and secondary nodes with their names.

Image

QDevice Specs

Now with only 2 nodes in the cluster, if one goes down for any reason your remaining node will not be able to hold “quorum” which locks the node down in a read-only or inaccessible mode until the other node gets brought back up.

To bypass this you will need to create another machine called a QDevice. This can be a VM, a Raspberry Pi, a computer, etc. It does NOT have to have insane specs though. This device is just here to be a third node to hold Quorum. It is possible to use a VM on one of your Proxmox nodes, however, if that node goes down, so will Quorum which renders your cluster useless until it is brought back up.

I will be setting up a VM on my Ugreen NAS with the following specs:

QDevice Config

Once you have a VM, computer, etc. running Linux you will need to give it a static IP.

Run:

nano /etc/network/interfaces

And change your interface from dynamic to static. Add the preferred address, gateway, and DNS servers like in the picture below:

Image

Next you will want to install corosync onto this machine. Run the command:

apt install corosync-qnetd -y

For the current cluster nodes to talk with this, you might have to change some ssh settings. Run:

nano /etc/ssh/sshd_config

Find the following lines:

#PermitRootLogin prohibit-password
#PasswordAuthentication yes

Uncomment them out and change “prohibit-password” to “yes”. They should look like this after:

PermitRootLogin yes
PasswordAuthentication yes

On BOTH Proxmox nodes in your cluster, run the following command:

apt install corosync-qdevice -y

On only ONE of your nodes, run the command:

pvecm qdevice setup 172.16.1.50

After that runs, check your status by running:

pvecm status

Image

If you see “expected votes: 3” that means it works and you now have 3 total nodes. This means even if one of your nodes goes down, you will still maintain quorum and wont brick your cluster.

Going back to the Proxmox web UI and navigating through Datacenter > Cluster, you will see your two Proxmox nodes. You will not see your QDevice as it is not a Proxmox server.

Image


Setting up Data Center Manager

Download the datacenter ISO here: https://www.proxmox.com/en/downloads/proxmox-datacenter-manager

Install Data Center Manager

You can install DCM on anything similar to the QDevice. This will just need better specs than that. For example, I installed this on another VM on my Ugreen NAS with the following specs:

Once installed, you can access it by going to: http://your-ip:8443

Linking with your Cluster

When accessing the web UI, login with the credentials you made during installation.

Click on Remotes > Add > Proxmox VE.

It will ask you for the IP address of the server. Put that in along with the port (i.e 172.16.1.24:8006).

Image

Click next which takes you to settings. Select “Use Existing Token”.

Creating a Token

You will need to create a token on your primary node. Access the node's web UI and navigate to Datacenter > Permissions > API Tokens.

Click on Add and put in a name for the token under Token ID. Uncheck the Privilege Separation and click Add.

Image

This brings up a new page with your full token ID and your secret. Copy both of those to a note or somewhere you can keep handy for the next few steps.

Image

Now go back to your Data Center Manager web UI and paste the Token ID under Token and the Secret under Secret. Make sure to give the Remote ID a value.

Image

Click Next. It shows the endpoints available on that node. Change the hostname/IPs to the IPs and port numbers of your nodes. The fingerprint is filled out automatically. Click next to continue the summary and finish it.

Image

Accessing Dashboard

To access one of the dashboards go under Remotes > PVE. This dashboard shows the information of your nodes like seen below:

Image

Clicking on dashboard takes you the actual dashboard of the Datacenter Manager which will look like this:

Image

That is basically it! You now have a working Proxmox cluster and a datacenter dashboard.