What is Proxmox?

Proxmox is an OpenSource platform for virtualization. Building cloud using Proxmox outlines the steps to create cloud and manage it from single interface with ease. It is now widely used to create private enterprise level cloud for corporate needs. It is used widely by organizations, web hosts, product companies, training institution and banks. It’s web interface makes life easier for the cloud administrator and is quite stable. Follow the below steps for building cloud using Proxmox

How to Set-up 3 node Proxmox cluster?

Here we will consider, 2 servers for Proxmox and 1 server for central file system like NFS. For the main Proxmox servers we will use Debian, while NFS will run on CentOS. 

Set the below IPs for the server:

Proxmox server 1: 192.168.1.102

Proxmox server 2: 192.168.1.103

NFS server : 192.168.1.101

Step 1:

  1. Configure host name on each of the servers.
  2. First SSH into 192.168.1.102 (Proxmox 1)
    1. Vi /etc/hosts
    1. Insert the below lines into the hosts file

192.168.1.102  proxnode1.insightdials.com proxnode1

192.168.1.103 proxnode2.insightdials.com proxnode2

192.168.1.101 nfs.insightdials.com nfsnode

  • Save and exit the file.
    • Reboot the server.
  • Now SSH into second server (192.168.1.103) and perform the below steps.
    • Vi /etc/hosts
    • Insert the below lines into the host file

192.168.1.103 proxnode2.insightdials.com proxnode2

192.168.1.102  proxnode1.insightdials.com proxnode1

192.168.1.101 nfs.insightdials.com nfsnode

  • Save and exit the file.
    • Reboot the server
  • Now SSH into NFS server 192.168.1.101 and perform the below steps
    • Vi /etc/hosts
    • Insert the below line into the hosts file

192.168.1.101 nfs.insightdials.com nfsnode

192.168.1.103 proxnode2.insightdials.com proxnode2

192.168.1.102  proxnode1.insightdials.com proxnode1

  • Save and exit the file.
    • Reboot the server.

Step 2:

  1. Next we need to add Proxmox repository into proxnode1( 192.168.1.102) and proxnode2 (192.168.1.103)
  2. Echo “deb http://download.proxmox.com/debian/pve buster pve-no-subscription “ >  /etc/apt/sources.list.d/pve-install-repo.list

Wget -O- “http://download.proxmox.com/debian/key.asc”| apt-key add –

Step 3:

  1. In this step let’s update the repository on both the proxnode1 and proxnode2


apt-get update && apt-get dist-upgrade

  • Reboot both the server.
  • SSH into proxnode 1 and perform the following command

apt-get install proxmox-ve ntp ssh postfix ksm-control-daemoonopen-iscsi systems-sysv

  • Reboot the server.
  • Perform the same step on Proxnode2(192.168.1.103)

Step 4:

  1. Now configure NFS server (192.168.1.101)
  2. First SSH into the NFS server and create a directory under /var for NFS, using the below command

mkdir -p /var/nfsdirectory

  • Now add all Proxmox server IPs into nfs configuration file exports.


Vi /etc/exports

  • Then add the below entries


/var/nfsdirectory 192.168.1.102(rw,sync,no_root_squash)

/var/nfsdirectory 192.168.1.103(rw,sync,no_root_squash)

Step 5:

  1. Next reexport the NFS directory and activate it by using the below command.


exportfs -r

exportfs -v

Step 6:

  1. In this step we will add cluster and have all nodes managed through single Proxmox

GUI

  • SSH into Proxmox node 1 (i.e proxnode1 – 192.168.1.102) and create new cluster.
    • Use the below command on Proxnode1 to create new cluster 

Pvecm create mycluster

  • Name the cluster as ‘my cluster’
    • Once the above command is executed, you can check the status of cluster using the below command and it will list the nodes

Pvecm status

Step 8:

  1. Now add Proxnode2 into the new cluster we created on Proxnode1. 
  2. SSH into proxnode2( 192.168.1.103)
  3. Execute the below command 

Pvecm add 192.168.1.102

Here 192.168.1.102 is the IP of our main node where we created the cluster. With the above command we are adding this Proxmox server also under that node.

Step 7:

  1. See if all nodes have been added into the cluster. For that let us go back to our main node (Proxnode1 – 192.168.1.102)
  2. SSH into 192.168.1.102 and execute the below command

Pvecm status

Output of the above command will list all the proxmox node we added and that means both the Proxmox can be managed using the Proxmox GUI. 

Step 9:

  1. Take Proxmox GUI at 192.168.1.102:8006
  2. Familiarize with the GUI

Step 10:  

  1. Now we need to add NFS server into this cluster and it can be easily done from the GUI.
  2. Take Proxmox GUI and go to storage section on the interface.
  3. While selecting storage, you will see a list of file systems supported. Click on NFS and it will take you to an interface to add your NFS server. 

ID: nfsdirectory

Server:192.168.1.101

Export: Will detect automatically the shared directory or just type /var/nfsdirectory

Content: Just select the default one

Nodes: Will list proxnode1 & proxnod2

Backup: Max backup.

  • Once all details are entered, just click on the add.
  • After that if you go to the datacenter section on the GUI and click on each nodes under it, you will see nodes listed as well as nfs being listed. This shows that nfs has been added as your central file system.

PS: This is a simple test-based setup and would recommend to follow all steps and requirements listed under www.proxmox.com

Conclusion

With Proxmox, we can quickly create growing cloud and manage it from single interface with ease. The best part is that its, stable and evolving continuously. Follow the steps outlined above for building cloud using Proxmox.

If you want all your KPI‘s or Business metrics monitored on a single dashboard, join our BETA.

By Blessen Cherian

Startup Enthusiast & Technical Blogger

error: Content is protected !!