Lab 02 ‐ Proxmox Clustering - Sleeeee/t301-admin-III GitHub Wiki
Click to open
In this second lab, we will build further upon the infrastructure we virtualized inside Proxmox. As a reminder, here is the base infrastructure that has been created through Lab 01 :
Figure 02-01 : State of the infrastructure before the lab
By the end of the lab, we will have placed both our hypervisors inside a cluster and linked them to a Storage Area Network :
Figure 02-02 : State of the infrastructure after the lab
Click to open
Lab 01 has led us to deploy a single hypervisor containing a single Debian VM. In order to complete Lab 02, we will first need to create another VM, and set up our second Proxmox hypervisor (hyps1102). We can read through first lab's documentation in order to get this done.
Click to open
Before setting up clustering and the SAN link, we will need to create Linux Bridges (as seen in Lab 01) for each interface of our hypervisors. To document it in the most maintainable way, we will create a network map that describes all the existing and new addressing for the Linux Bridges. An up-to-date version can now be found on the home page. This is what is looks like by the time this page is written :
hyps1101:
- san Linux Bridge:
- MAC : bc:24:11:04:5b:9b
- IP: 10.250.0.11/24
- Bridge ports : ens21
- migration Linux Bridge:
- MAC : bc:24:11:2a:78:8e
- IP : 10.250.1.11/24
- Bridge ports : ens20
- vmnets Linux Bridge:
- MAC : bc:24:11:c1:63:b1
- IP : /
- Bridge ports : ens19
hyps1102:
- san Linux Bridge:
- MAC : bc:24:11:d7:08:3b
- IP : 10.250.0.111/24
- Bridge ports : ens21
- migration Linux Bridge:
- MAC : bc:24:11:ea:a9:83
- IP : 10.250.1.111/24
- Bridge ports : ens20
- vmnets Linux Bridge:
- MAC : bc:24:11:42:cf:c6
- IP : /
- Bridge ports : ens19
We can follow the procedure described in Lab 01 to create the necessary Linux Bridges. Once the changes are applied, this is what the bridge configuration should look like :
Figure 02-03 : Bridge configuration for hyps1101
Figure 02-04 : Bridge configuration for hyps1102
Click to open
We can now create our Proxmox cluster to manage both our hypervisors. In order to do that, one hypervisor will create the cluster, and generate information that the second hypervisor will use to join that cluster. In our case, we will create it from hyps1101 and invite hyps1102. We will thus need to navigate to hyps1101's management web page and find the desired menu under Datacenter > Cluster > Create Cluster. We can now create our cluster with the following information :
- Name :
cluster-11 - Bridge :
migration
Once the cluster has been created on hyps1101, we can request information for hyps1102 to join. This information can then be entered on hyps1102's management web page in the Datacenter > Cluster > Join Cluster menu.
In the cluster configuration (Options > Migration Settings), we can enable network migrations to migrate our VMs from one hypervisor to the other through stuMigration. Below is the state of the cluster once everything has been performed :
Figure 02-05 : cluster11 configuration
Click to open
We will now use the stuSan subnet and set up our Storage Area Network for it to communicate on the corresponding Linux Bridges. The first step to configure is to set up an iSCSI adapter under the Datacenter > Storage > Add > iSCSI submenu using those informations :
- Portal : 10.250.0.2
HYPID - Nodes : All
From there, we just need to create a new LVM under Datacenter > Storage > Add > LVM. Obviously it will use our newly created iSCSI. We will also need to make it a shared volume. Here is the storage configuration we can see at that point :
Figure 02-06 : Volume configuration
And we are all set. We can now migrate machines from one hypervisor to the other. To demonstrate this works correctly, we have migrated debs1101 to hyps1102 under the Migrate option in the VM submenu. We then ensured that we did not lose connectivity :
showcase@debian:~$ ping 10.11.0.51
PING 10.11.0.51 (10.11.0.51) 56(84) bytes of data.
64 bytes from 10.11.0.51: icmp_seq=1 ttl=64 time=0.867 ms
64 bytes from 10.11.0.51: icmp_seq=2 ttl=64 time=0.777 ms
64 bytes from 10.11.0.51: icmp_seq=3 ttl=64 time=0.662 ms
64 bytes from 10.11.0.51: icmp_seq=4 ttl=64 time=0.897 ms
...
root@debs1102:~# ping 10.11.0.50
PING 10.11.0.50 (10.11.0.50) 56(84) bytes of data.
64 bytes from 10.11.0.50: icmp_seq=1 ttl=64 time=0.952 ms
64 bytes from 10.11.0.50: icmp_seq=2 ttl=64 time=1.17 ms
64 bytes from 10.11.0.50: icmp_seq=3 ttl=64 time=0.923 ms
64 bytes from 10.11.0.50: icmp_seq=4 ttl=64 time=0.872 ms
...