This guide will walk you through the steps to configure a Proxmox VE cluster. A Proxmox VE cluster allows you to manage multiple Proxmox nodes from a single web interface and provides high availability and load balancing features.
Prerequisites
- At least two Proxmox VE nodes with Proxmox VE installed and updated.
- All nodes should be on the same network and able to communicate with each other.
- Proper DNS resolution or host file entries for all nodes.
Step 1: Configure Network Settings
Ensure that the network settings are correctly configured on all nodes. Edit the /etc/hosts
file on each node to include the IP addresses and hostnames of all nodes:
nano /etc/hosts
192.168.1.1 node1.example.com node1
192.168.1.2 node2.example.com node2
192.168.1.3 node3.example.com node3
Step 2: Set Up SSH Keys
Generate SSH keys on each node if not already done:
ssh-keygen -t rsa -b 2048 -C "[email protected]"
Copy the SSH keys to all other nodes:
ssh-copy-id [email protected]
ssh-copy-id [email protected]
Step 3: Create the Cluster
On the first node, create the cluster:
pvecm create my-cluster
This command initializes the cluster with the name my-cluster
.
Step 4: Add Nodes to the Cluster
On each additional node, join the cluster using the command:
pvecm add node1.example.com
Replace node1.example.com
with the hostname or IP address of the first node. You will be prompted for the root password of the first node.
Step 5: Verify Cluster Status
On any node, you can check the status of the cluster with the following command:
pvecm status
The output should show all nodes in the cluster and their status.
Step 6: Configure Fencing (Optional)
Fencing ensures that a malfunctioning node does not affect the cluster. Configure fencing devices as needed. Refer to the Proxmox documentation for specific fencing configurations.
Conclusion
Your Proxmox VE cluster should now be configured and ready for use. You can manage the cluster through the Proxmox web interface, where you can create and manage virtual machines, containers, and other resources.