How to Cluster Proxmox

How to Cluster Proxmox

Category : How-to

Get Social!

proxmox logo grad

Clustering is a technique to group together multiple machines or devices providing common parameters, such as storage, over all machines in the cluster. Proxmox can be clustered to provide a common interface to control all machines in the cluster.

Automatic failover of machines can also be achieved with a Proxmox cluster however this requires significant setup and it not available out of the box. I will discuss VM failover in a future blog post.

Create a new Cluster

To join one or more nodes to a Proxmox cluster we must first create a cluster on one of the machines. Run the below command on your first Proxmox node and replace [CLUSTER_NAME] with a name for your cluster.

pvecm create [CLUSTER_NAME]

Check the status of a Cluster

Once a cluster is created, you can check the status using the status command.

pvecm status

You can use the nodes command to view all nodes in the cluster.

pvecm nodes

Add a new Node to the Cluster

Adding a new node to a Proxmox cluster is easy and only requires the hostname or IP address of the primary cluster node. It is highly recommended to use a hostname or DNS entry over an IP address to shield any IP address changes.

On a non-clustered node, log in and run the pvecm add command and specify the IP address or hostname. You can use the IP address or hostname of any already clustered Proxmox node.

pvecm add [HOSTNAME_OF_CLUSTER]

You must not have any virtual machines/ OpenVZ containers running on the node which you are adding to the cluster. All nodes should also be running the same component versions of Proxmox to ensure compatibility.


6 Comments

pete g

24-Jan-2014 at 2:29 pm

So after the cluster is created (in a fairly small non profit organization with lmtd resources), how do we “broker” the sessions to the users. Here’s what’s asked:
We want to have all the machines NOT started. But when a user wants to start their own virtual machine, what’s the reccm way to have them log in with limited priviliges to just be able to start their machine as they need to use it. (Also can we set a time out, SO , if a machine is unused aft x hours it gets hibernated or shut down),,.. thx, have hunted all over fo this info and it seems scarce.

    james.coyle

    28-Jan-2014 at 9:04 am

    You would have to write a custom solution for this on each virtual machine. When the machine has no activity for the specified time, you would initiate the shutdown command which would free up the resource on the hardware node.

Frank

4-Aug-2016 at 9:45 pm

I followed your steps I am getting this Authentication Already exists and won’t let me go any further. any advise is really appreciate it.

    james.coyle

    4-Aug-2016 at 9:46 pm

    What step are you running and what is the exact error you’re getting? With any problem you face, details are the key.

techdanger

3-Nov-2016 at 7:06 am

hi james,

i have add new nodes that are freshly installed but the new node are not added to the existing node cluster…detailed are here https://forum.proxmox.com/threads/proxmox-4-1-cluster-problem.30069/ , any idea what happen ? should i reinstall the new nodes ?thank in advance

Bob

18-Mar-2021 at 7:26 pm

Hi James,

Admittedly it’s an old post but I see a tip that can put the apprentice proxmoxer on a perilous road

“It is highly recommended to use a hostname or DNS entry over an IP address to shield any IP address changes.”

The official documentation say the reverse at https://pve.proxmox.com/wiki/Cluster_Manager#_preparing_nodes
“Note that we always recommend to reference nodes by their IP addresses in the cluster configuration”

Actually if the NS or Hosts record for the node changes, i think he becomes unreachable and the cluster will lock if he losts the corum.

Leave a Reply

Visit our advertisers

Quick Poll

How often do you change the password for the computer(s) you use?

Visit our advertisers