Installing XCP-ng and Xen Orchestra: A Powerful and Cost-Effective VMware Alternative

Virtualization tutorial - IT technology blog
Virtualization tutorial - IT technology blog

Quick start: Deploy Enterprise Virtualization in 5 Minutes

If you need to quickly set up a virtualization cluster for a project, here is the fastest path to get XCP-ng and Xen Orchestra (XO) battle-ready:

  1. Prepare the ISO: Go to the XCP-ng homepage and download the latest ISO. Use Rufus (select DD mode) or BalenaEtcher to flash it to a USB drive.
  2. Install the Host: Boot from the USB and follow the wizard. Just set the root password and configure a static IP. This process usually takes about 3 minutes on an SSD.
  3. Install Xen Orchestra (XO): Once the host is up, SSH into the host’s IP and run this magical command line to install the Community version (unlocks all features):
bash <(curl -s -L https://raw.githubusercontent.com/ronivay/XenOrchestraInstallerNext/master/xo-install.sh)

Once installed, access the XO IP via your browser (user: [email protected] / pass: admin). Instantly, a management dashboard as professional as vCenter will appear before your eyes.

Why is Everyone Switching to XCP-ng?

Following Broadcom’s acquisition of VMware and license policy changes that sent prices skyrocketing, many have asked me: “What should I use instead of ESXi?Proxmox is great for homelabs; I’m currently running 12 VMs on it for quick testing. However, if you need a disciplined system with tight Enterprise-style Cluster management, XCP-ng is the top choice.

XCP-ng is essentially a fully open fork of Citrix XenServer. When Citrix began “squeezing” users by cutting free features, the community stepped in to maintain XCP-ng. Thanks to this, we get Live Migration, High Availability (HA), and advanced Backup completely for free.

The Perfect Pair: XCP-ng + Xen Orchestra

  • XCP-ng: The core Hypervisor layer installed directly on hardware. It’s responsible for squeezing every bit of performance out of the CPU and RAM.
  • Xen Orchestra (XO): The controlling brain. Unlike the heavy and expensive vCenter, XO runs extremely light on a Linux VM, allowing you to orchestrate your entire server fleet remotely via the Web.

Practical Configuration Guide

1. Hardware Selection

XCP-ng is very “forgiving” with older hardware. You can repurpose old Dell R620 or HP DL360 Gen8 servers for a few hundred dollars. Just 8GB of RAM is enough to smoothly run 3-4 basic VMs.

2. Setting up Storage (SR)

In XCP-ng, storage is called a Storage Repository (SR). For convenience, I often use NFS to store ISO files. You can quickly set up an NFS folder on another Linux server using these commands:

sudo apt install nfs-kernel-server
sudo mkdir -p /mnt/iso_storage
sudo chown -R nobody:nogroup /mnt/iso_storage
echo "/mnt/iso_storage *(rw,sync,no_subtree_check)" | sudo tee -a /etc/exports
sudo exportfs -a

In the XO interface, simply select New > Storage and point it to the IP of this Linux machine to have your ISO library ready for VM installation.

3. Creating Your First Virtual Machine (VM)

Click New > VM and select the corresponding Template (Ubuntu, Windows…). A quick tip: Always choose HVM (Hardware Virtualization) mode for modern OSs to achieve the best processing speed.

Pro Tip: Build XO Yourself to Unlock 100% of Features

The Appliance version (XOA) downloaded from the homepage usually limits Backup features to sell licenses. But since it’s open-source, you can use the xo-install script I mentioned above. This script automatically downloads the source from GitHub, compiles, and installs everything from Node.js to Redis. You’ll get full Delta Backup and Replication features without spending a penny on licensing.

“Battle-Hardened” Operational Experiences

After years of tinkering, I’ve gathered three critical tips for you:

  • Continuous Backup: Xen Orchestra features Continuous Replication. It pushes snapshots to a backup host in real-time. If the primary host fails, a single click brings the VM back to life on the other side, with near-zero downtime.
  • Always Install Xen Tools: For Windows VMs, missing xe-guest-utilities is a disaster. Without it, you won’t see the VM’s IP on the dashboard, and network speeds will be sluggish.
  • Leverage Bonding: If your server has 4 LAN ports, aggregate them (LACP). This not only increases bandwidth but also ensures the system keeps running smoothly even if one cable fails.

XCP-ng provides a very “industrial” feel and is extremely stable. If you want to understand how Data Centers operate in the real world without spending a fortune on VMware, start with XCP-ng today.

Feel free to give it a try, and if you get stuck anywhere, just leave a comment below!

Share: