XCP-ng: Evolution of Lab V2.0 - Architecture and Introduction
- Why evolve the lab: the VMware/Broadcom crisis and the rise of alternative hypervisors.
- Objective: a three-server XCP-ng cluster with replicated storage and high availability.
- Detailed hardware choices and target architecture.
- First article in a series of six; the next part begins with the installation of XCP-ng.
Introduction
It has been over two years since the acquisition of VMware by Broadcom shook the global IT industry.
The dominant position of the vendor's virtualization products has been deeply challenged in many companies due to the price increases and licensing changes associated with it.
Even though the crisis has calmed down somewhat, the hypervisor war continues with the growing importance of players who are not new (or very few), but who were previously operating in different markets or targeting specific user communities.
Among those that have experienced the most hype in recent years, ProxMox is a prime example. Robust, based on KVM, and present since 2008, Proxmox has exploded recently with rapidly increasing adoption and the arrival of new products, such as the Datacenter Manager console.
Proxmox is clearly establishing itself as the main alternative to VMware and its ESX hypervisor.
Nevertheless, other vendors are also gaining traction. Because I don't always want to do what everyone else does, I turned to one of them over a year ago: the French company Vates and its XCP-ng product based on the Xen hypervisor.
I have already had the opportunity to introduce the company and its range of products. I invite you to read the dedicated article to learn more.
I started slowly with their ecosystem by beginning with a small two-node cluster, all managed by XenOrchestra, their "vCenter" like solution.
I also described the entire installation and basic configuration in this same article.
In my usage, I only enabled very few advanced features, and my two nodes, although present in the same pool, had no shared storage and no HA functionality activated to back each other up.
Now is the time for me to move forward and take things to the next level by creating a real cluster capable of supporting VM migration from one node to another with failover.
Objectives and targets
That's why I'm starting this series of articles to describe the installation of this new lab, which is entirely based on XCP-ng and Xen Orchestra.
As I usually do, we will start by defining the architecture and describing the different components that will be involved.
It's always important to define your goals before diving in headfirst...and for that, there's nothing better than a diagram.
Click the image to enlarge.
The objectives of this lab will be to exploit as many features as possible from the Vates ecosystem, getting as close as possible to a VMware ESX cluster, and at least offering:
- High Availability (HA): Automatic restart and recovery of VMs in case of failure of one node on the remaining nodes.
- Hot VM Migration: Moving a VM from one node to another (like vMotion) and from one storage location to another (like vStorage).
We will see if other functions, such as possible load-based VM rebalancing (like DRS), are possible.
Hardware choices
Server
With AI currently dominating all hardware markets at the time of writing, and without an unlimited budget, we're going to focus on recycling.
To do this, I will leverage my Lenovo ThinkCenter M920q machines. These are modest mini-PCs equipped with a 6-core Intel i5-8500T CPU and 16 GB of DDR4 RAM.
Click the image to enlarge.
I'm going to somewhat boost these by increasing their memory up to 64GB. Although not officially supported, I already have this type of configuration in place, especially for VMware and my existing lab running XCP-ng.
I will use a set of three servers: the two that I was already using with XCP-ng, and one that I was previously using with VMware.
The advantage of these small machines for a lab is that they are compact and consume little power, without getting too hot.
However, I would recommend replacing the thermal paste by disassembling the cooling block. By using a higher quality paste, you can easily gain 2 to 3 degrees Celsius, which can be beneficial in small spaces, while also reducing the noise of the fans.
These machines can be easily obtained second-hand. Furthermore, there are many spare parts available and numerous modifications that allow you to change their use, as they have the advantage of having an internal PCI express port.
However, these are desktop PCs that are starting to show their age; do not expect exceptional performance... but for a lab and a few VMs, they can perfectly suffice.
A small anecdote: updating their BIOS can only be done with original memory modules. And there is nothing to indicate this when you start the operation... You just get a black screen after restarting the update... which ultimately never happened. You force a restart, and you are in the same state as before the update, with the old version of the BIOS. In short, even Gemini, Claude or ChatGPT could not help me... and an old Reddit post helped me find the solution.
Storage
While some ThinkCenters have two NVME slots, mine only have one with a modest 256GB by default.
This is insufficient for my needs, so I replaced them with 1TB Samsung 990 Pro drives. Even though their prices have increased, I was able to find some still available on Amazon (170€).
Click the image to enlarge.
Network
By default, the ThinkCenters only have one integrated network card at 1G. It is an Intel I219-LM. It has the advantage of being natively supported by many operating systems and solutions, but it is very limited for a hypervisor clustering need, especially if you want to set up a shared storage network.
That's why I took advantage of the internal PCI express slot to add a 10G card.
In my previous lab, I had already made this addition, but via a four-port 1G configuration.
Here, this is not enough; I need more bandwidth, and switching to 10G is essential.
So, I turned to a ConnectX-3 with a Mellanox MT27500 chipset, which is known for being very well supported by open source software, with reduced heat generation for a 10G card and compactness suitable for the limited space offered by a ThinkCenter. (The card costs around 65€ on Amazon).
Click the image to enlarge.
You just need a specific PCI bracket, available without problems on AliExpress or other sites, to connect the card... And you should assume that you may not be able to fix the end of the card at the output of the server.
Click the image to enlarge.
It is important to note that this is a card with an SFP+ slot and not a 10G copper port.
This choice is justified by the lower heat generation, especially if you subsequently use a SFP+ DAC cable or the SFP is integrated.
It may seem insignificant, but an SFP using copper will consume between 2 watts and 5 watts, while a Twinax DAC cable will be limited to 0.5 watt. In a machine like a ThinkCenter where airflow is very restricted, this makes a difference.
To connect all of this, I bought a MikroTik CRS309-1G-8S+IN (257€ on Amazon).
The switch/router from the Latvian brand is very popular in home labs. It has 8 x 10G SFP+ ports and, most importantly, it is completely passive. This is an advantage when it's located in the middle of a living room...
Thanks to its RouterOS, it offers many functions and remains excellent value for money.
Click the image to enlarge.
I will also rely on my existing switches (Netgear and Zyxel) for 1G connections (I'll call them legacy switches).
Architecture
System
The lab consists of three servers on which XCP-ng is deployed:
- prdxcpsrv001 (192.168.10.20/24)
- prdxcpsrv002 (192.168.10.21/24)
- prdxcpsrv003 (192.168.10.22/24)
They must be in an XCP-ng pool that I will name xcp-pool.
A pool allows you to group the computing (CPU) and memory (RAM) resources of all servers.
Within the XCP-ng ecosystem, each group of servers (called a pool) has a master server (pool master) that acts as an orchestrator. In my case, it will be prdxcpsrv001.
It will also host the first VM prdxcpxor501 (192.168.10.23) for installing Xen Orchestra, but we'll cover that in a separate article.
Click the image to enlarge.
Without a pool, there is no LiveMigration or High Availability.
Network
The network configuration is important because it needs to meet several requirements:
- Provide a separate management interface to separate the workflow from the administration flow.
- Offer multiple VLANs to segment traffic by usage.
- Provide sufficient bandwidth, especially for replicated storage, which we will discuss shortly.
To achieve this, here's the target configuration:
| Server Ports | Switch Port | VLAN | MTU | Usage | Name in XCP-ng | Subnet |
|---|---|---|---|---|---|---|
| eth0 (1G) | 1G (legacy switch) | na | 1500 | Server management | default | 192.168.10.0/24 |
| eth1 (10G) | sfp1, sfp2, sfp3 | na | 1500 | LAN traffic | LAN | 192.168.10.0/24 |
| eth1 (10G) | sfp1, sfp2, sfp3 | 6 | 1500 | Intermediate DMZ traffic | VLAN_WEB | 192.168.5.0/24 |
| eth1 (10G) | sfp1, sfp2, sfp3 | 10 | 1500 | Front-end DMZ traffic | VLAN_DMZ_FIRST | 192.168.8.0/24 |
| eth1 (10G) | sfp1, sfp2, sfp3 | 12 | 9000 | Traffic for storage | VLAN_STORAGE | 192.168.12.0/24 |
I won't go into more detail at this stage; we will see the details of the configuration in a separate article.
Storage
In terms of hardware, I only have a 1TB disk per server. The goal will be to divide it into three parts.
- OS & System: Approximately 40GB dedicated to the installation of XCP-ng and the system.
- SR local: An SR stands for Storage Repository, which is equivalent to a datastore in VMware. It's a dedicated storage space for hosting virtual machines. Each server will have a 150GB local SR. Virtual machines hosted on it can only be run on the server where their data resides. This will be useful for VMs where redundancy is provided by the associated software solution, such as Kubernetes control planes….
- Replicated SR: The remaining disk space, approximately 740GB, will be used for the Vates block storage replication solution: xostor.
The last part of the disk is special. The goal will be to create a storage solution that combines all three 740GB partitions to build a global SR for the cluster via xostor.
Click the image to enlarge.
I will have the opportunity to discuss this in more detail when we address its implementation, but xostor is the implementation of LINSTOR/DRBD within an XCP-ng cluster. If none of these terms are familiar to you, just know for now that it is a block storage data replication solution that allows synchronization between multiple local storages. This provides replication of data from one server to another. This allows a VM to be run on different nodes (one at a time, of course) and have its data duplicated.
In my case, I will choose to have a replication level of two, meaning that a VM on the XOSTOR SR will have its data written to two disks: one on the local server where it runs, and the other on one of the remaining servers in the cluster. The VM can then be started on any of the three servers if its primary node fails. Even the third machine, which does not have the data on its disk (replication of 2), would be able to access the data from the second server over the network.
(We could have a replication level of three, but we would lose even more space. Two is a good compromise, as we achieve a total usable space of just over 1TB.)
Therefore, it is essential to use a 10G network to ensure sufficient bandwidth and low latency for this purpose.
Each server will have a dedicated IP address on the storage VLAN to exchange block data:
- prdxcpsrv001: 192.168.12.1
- prdxcpsrv002: 192.168.12.2
- prdxcpsrv003: 192.168.12.3
Again, prdxcpsrv001 will be the orchestrator for coordinating data.
It is also important to note that this mechanism can only function with a minimum of three servers, due to arbitration and quorum requirements. Finally, my NAS (a terramaster F4-424) will be used as an NFS space where various OS installation ISOs will be available for deploying my VMs.
Conclusion
That's it, the stage is set; there's nothing left to do but...
To create this lab, we need to rely entirely on the resources of the XCP-ng ecosystem, as appliances and assisted installations are reserved for those who purchase a license from the vendor. (The appliance can be used for free, but its functions will then be limited). I will, of course, build upon what I have already done, especially for installing the hypervisor and Xen Orchestrator, but the storage part will be different, and it will probably require some effort to achieve the desired result.
Let's start with the basics by installing XCP-ng on the three servers and creating a VM to host Xen Orchestra: this is where you can find it.