XCP-ng: Open-Source VMware Alternative for Homelabs
Deploy XCP-ng as your free, enterprise-grade hypervisor. Migration from VMware and Xen Orchestra management.
VMware’s pricing changed overnight. Broadcom’s acquisition brought uncertainty and skyrocketing costs. Your existing VMware environment faces an uncertain future. You need a professional-grade alternative without vendor lock-in or enterprise licensing fees.
XCP-ng delivers exactly that—enterprise virtualization, completely free and open-source.
Built on the battle-tested Xen hypervisor that powers Amazon EC2 and Linode, XCP-ng combines proven technology with modern management tools. It’s not just “good enough for a homelab”—it’s the same foundation running massive cloud platforms.
Why This Guide Matters
Most XCP-ng guides focus on basic installation. This guide goes further:
- Complete installation and configuration walkthrough
- Xen Orchestra deployment for powerful web management
- Real-world migration strategies from VMware
- Advanced features: pool management, HA, live migration
- Storage repository optimization
- Automation and API integration
Whether you’re fleeing VMware or building a new homelab, this guide provides everything you need.
What You’ll Accomplish
By the end of this guide, you will:
- Install XCP-ng and understand Xen architecture
- Deploy Xen Orchestra for web-based management
- Create and manage VM pools across multiple hosts
- Configure shared storage for live migration
- Migrate VMs from VMware ESXi
- Implement backup strategies
- Optimize performance for your workloads
- Leverage automation through the XO API
Prerequisites
Required Knowledge:
- Basic virtualization concepts
- Linux command line basics
- Networking fundamentals (IP addressing, VLANs)
- Storage concepts (NFS, iSCSI, local storage)
Hardware Requirements:
Minimum:
- 64-bit CPU with hardware virtualization (Intel VT-x or AMD-V)
- 4GB RAM (8GB recommended minimum)
- 46GB disk space for XCP-ng installation
- Gigabit network interface
Recommended Homelab Setup:
- Modern multi-core CPU (Intel Xeon, AMD EPYC/Ryzen)
- 32-64GB RAM
- SSD for XCP-ng installation (120GB+)
- Separate storage for VMs (local, NFS, iSCSI)
- 10Gbps network (for multiple hosts)
Section 1: Understanding XCP-ng and Xen
What is XCP-ng?
XCP-ng (Xen Cloud Platform - Next Generation) is a turnkey virtualization platform based on Xen Project and Citrix Hypervisor (formerly XenServer). Key characteristics:
Foundation - Xen Hypervisor:
Type-1 bare-metal hypervisor with 20+ years of development. Unlike KVM (used by Proxmox), Xen uses a different architectural approach:
Xen Architecture:
Hardware Layer
├── Xen Hypervisor (Type-1, bare metal)
│ ├── Domain 0 (Dom0) - Control Domain
│ │ └── Runs XCP-ng management stack
│ ├── Domain U (DomU) - Guest VMs
│ │ ├── HVM (fully virtualized)
│ │ └── PV (paravirtualized for Linux)
│ └── Hardware access control
vs. KVM Architecture (for comparison):
Hardware Layer
├── Linux Kernel (with KVM module)
│ ├── Host OS
│ ├── QEMU processes (VMs)
│ └── libvirt management Key Differences from Proxmox/KVM:
- Xen: Hypervisor runs at lowest level, Dom0 manages guests
- KVM: Linux kernel IS the hypervisor, VMs are processes
- Xen: Better hardware isolation, proven at cloud scale
- KVM: More Linux-native, simpler architecture
XCP-ng Features:
- Full VM lifecycle management (create, start, stop, migrate)
- Live migration without shared storage (using XCP-ng 8.2+)
- Advanced networking (VLAN, bonding, SDN)
- Snapshot and backup capabilities
- GPU passthrough and vGPU support
- REST API for automation
- Resource pools (cluster management)
- High availability (HA)
- Rolling pool updates (zero downtime)
Completely Free:
Unlike Citrix Hypervisor, XCP-ng has NO paid tiers. All features are available, including:
- HA clustering
- Live migration
- Automated backups
- GPU passthrough
- Updates and support (community)
Xen Orchestra: The Management Interface
XCP-ng itself has no built-in web UI. Management options:
1. Xen Orchestra (XO) - Recommended:
Modern web interface built with:
- Vue.js frontend
- Node.js backend
- WebSocket communication
- REST API
Two versions:
- XOA (Xen Orchestra Appliance): Pre-built VM from official team
- XO from Sources: Free, self-built version
2. XCP-ng Center:
Windows-only management application (legacy)
3. xe CLI:
Command-line interface for advanced operations
Why Xen Orchestra?
- Cross-platform web interface
- Continuous replication (backup alternative)
- Delta backups (incremental, efficient)
- VM deployment from templates
- Performance monitoring and statistics
- Scheduled operations
- User management and RBAC
- Proxy mode for remote sites
Section 2: Installing XCP-ng
Preparing Installation Media
Step 1: Download XCP-ng
# On your workstation
cd ~/Downloads
# Download latest XCP-ng ISO (8.3 as of writing)
wget https://mirrors.xcp-ng.org/isos/8.3/xcp-ng-8.3.0.iso
# Verify checksum
wget https://mirrors.xcp-ng.org/isos/8.3/xcp-ng-8.3.0.iso.sha256sum
sha256sum -c xcp-ng-8.3.0.iso.sha256sum Step 2: Create Bootable USB
Linux/macOS:
# Find USB device
lsblk
# Write ISO to USB (replace /dev/sdX with your USB device)
sudo dd if=xcp-ng-8.3.0.iso of=/dev/sdX bs=4M status=progress
sync Windows:
- Use Rufus or Etcher
- Select XCP-ng ISO
- Write to USB drive
Installation Process
Step 1: Boot from USB
1. Insert USB drive into server
2. Boot from USB (F12/F11/DEL to access boot menu)
3. XCP-ng installer boots to welcome screen Step 2: Welcome and Keyboard
Welcome to XCP-ng 8.3 Installer
- Select keyboard layout (US English)
- Accept EULA
- Continue Step 3: Installation Disk Selection
Choose disk for XCP-ng installation:
⚠️ CRITICAL: This will ERASE the selected disk
Recommendations:
- Dedicated SSD/NVMe for XCP-ng (120GB minimum)
- DO NOT install on disk intended for VM storage
- Separate OS from data
Select disk: /dev/sda (your installation SSD)
Enable thin provisioning: Yes (recommended for local SR)
Continue Step 4: VM Storage Repository
Select additional disk for VM storage (optional):
Option 1: Enable thin provisioning on system disk
- Use remaining space on /dev/sda
- Good for single-disk systems
- Less flexible
Option 2: Separate disk (recommended)
- Select /dev/sdb for VM storage
- Enable thin provisioning: Yes
- Better performance and flexibility
Continue Step 5: Installation Source
Choose installation source:
- Local media (USB): Selected by default
- HTTP/FTP/NFS: For network installation
Use: Local media
Continue Step 6: Verify Installation
Verification ensures ISO integrity
- Verify installation: Yes (recommended)
- Skip verification: Only if you verified checksum earlier
Verify Step 7: Root Password
Set root password for XCP-ng host:
Password: [strong password]
Confirm: [strong password]
⚠️ This password is for:
- SSH access to Dom0
- xe CLI commands
- Initial XO connection
Continue Step 8: Networking Configuration
Primary Management Interface:
Network interface: eth0 (or your primary NIC)
IP Configuration:
- DHCP: Quick start, not recommended for production
- Static IP (recommended):
IP address: 192.168.1.100
Netmask: 255.255.255.0
Gateway: 192.168.1.1
DNS Configuration:
Hostname: xcp-ng-host1
DNS servers: 1.1.1.1, 8.8.8.8
Continue Step 9: Time Zone
Region: America
City: New_York (or your timezone)
NTP Servers (recommended):
- 0.pool.ntp.org
- 1.pool.ntp.org
Continue Step 10: Install
Review configuration summary:
✓ Installation disk: /dev/sda (120GB SSD)
✓ VM storage: /dev/sdb (1TB HDD)
✓ Network: 192.168.1.100 (static)
✓ Hostname: xcp-ng-host1
✓ Timezone: America/New_York
Install XCP-ng
Installation progress: 5-10 minutes Step 11: Complete Installation
Installation Complete!
Remove installation media
Reboot system
After reboot:
- XCP-ng boots from installed disk
- Web console available at: https://192.168.1.100
- SSH access: ssh [email protected] First Boot and Verification
Access XCP-ng Console:
After reboot, console shows:
__ __
/ /__ _ __ XCP-ng 8.3.0
/ _| '_ / (_| |_) |
/_/____| .__/
|_|
Welcome to xcp-ng-host1
Network Configuration:
eth0: 192.168.1.100/24
Access via:
SSH: ssh [email protected]
Web: https://192.168.1.100 (Xen Orchestra required)
Login: root
Password: [your password] Verify Installation:
# SSH to XCP-ng host
ssh [email protected]
# Check XCP-ng version
cat /etc/xcp-ng-release
# Output: XCP-ng release 8.3.0 (build 2025...)
# Check host UUID
xe host-list
# Output shows host UUID and name
# Check storage repositories
xe sr-list
# Should show local storage SR
# Check network configuration
xe pif-list
# Shows physical interfaces
# Check available memory
free -h
# Check CPU info
lscpu Section 3: Deploying Xen Orchestra
Understanding XO Deployment Options
Option 1: XOA (Xen Orchestra Appliance) - Official:
Pros:
- Pre-configured VM image
- Official support available
- Easy updates
- Recommended by XCP-ng team
Cons:
- Free tier has feature limitations
- Advanced features require subscription
- Less customizable
Option 2: XO from Sources - Community:
Pros:
- Completely free, all features unlocked
- Fully customizable
- Latest development features
- Community supported
Cons:
- Manual installation required
- Self-managed updates
- No official support
- Requires Linux knowledge
We’ll cover both methods.
Deploying XOA (Quick Method)
Step 1: Deploy XOA VM
# SSH to XCP-ng host
ssh [email protected]
# Download XOA deployment script
bash -c "$(wget -qO- https://xoa.io/deploy)"
# Script prompts:
# Network: Select management network
# Storage: Select SR for XOA VM
# RAM: 2GB default (sufficient)
# Deployment takes 3-5 minutes
# Outputs XOA IP address: 192.168.1.101 Step 2: Access XOA
Browser: https://192.168.1.101
Default credentials:
Email: [email protected]
Password: admin
⚠️ Change password immediately!
XOA loads with connection wizard Step 3: Connect XOA to XCP-ng
Settings → Servers → Add Server:
Host: 192.168.1.100
Username: root
Password: [your XCP-ng root password]
Label: xcp-ng-host1
Auto-connect: Yes
Add server
XOA connects and discovers:
- Host resources
- VMs (including itself)
- Storage repositories
- Networks Installing XO from Sources (Full-Featured)
Step 1: Create Ubuntu VM for XO
Create VM manually or use this xe CLI method:
# On XCP-ng host
# Get SR UUID for storage
SR_UUID=$(xe sr-list name-label="Local storage" --minimal)
# Get network UUID
NETWORK_UUID=$(xe network-list bridge=xenbr0 --minimal)
# Create VM
VM_UUID=$(xe vm-install template="Ubuntu Jammy Jellyfish 22.04" new-name-label="Xen-Orchestra" sr-uuid=$SR_UUID)
# Configure VM
xe vm-param-set uuid=$VM_UUID name-description="Xen Orchestra from Sources" VCPUs-max=4 VCPUs-at-startup=2 memory-static-max=8GiB memory-dynamic-max=8GiB memory-dynamic-min=4GiB memory-static-min=4GiB
# Attach network
xe vif-create vm-uuid=$VM_UUID network-uuid=$NETWORK_UUID device=0
# Get Ubuntu ISO SR UUID
ISO_SR=$(xe sr-list content-type=iso --minimal)
# Attach Ubuntu ISO
xe vm-cd-add vm=$VM_UUID cd-name="ubuntu-22.04.3-live-server-amd64.iso" device=3
# Start VM
xe vm-start uuid=$VM_UUID
# Connect console to complete Ubuntu installation
# Or use VNC: xe vm-param-get uuid=$VM_UUID param-name=consoles Step 2: Install XO Dependencies
# SSH to Ubuntu VM after OS installation
ssh [email protected]
# Update system
sudo apt update && sudo apt upgrade -y
# Install Node.js (18.x LTS)
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
# Install build dependencies
sudo apt install -y build-essential redis-server libpng-dev git python3-minimal libvhdi-utils lvm2 cifs-utils nfs-common
# Install Yarn package manager
sudo npm install -g yarn
# Verify installations
node --version # Should show v18.x
yarn --version
redis-cli ping # Should return PONG Step 3: Build Xen Orchestra
# Clone XO repository
cd /opt
sudo git clone https://github.com/vatesfr/xen-orchestra.git
# Change ownership
sudo chown -R $(whoami):$(whoami) xen-orchestra
# Enter directory
cd xen-orchestra
# Install dependencies and build
yarn
yarn build
# This takes 10-15 minutes
# Compiles all XO components Step 4: Configure XO
# Copy default configuration
cd packages/xo-server
cp sample.config.toml .xo-server.toml
# Edit configuration
nano .xo-server.toml
# Key settings to modify:
[http]
listen = [
{ hostname = '0.0.0.0', port = 80 },
]
[https]
listen = [
{ hostname = '0.0.0.0', port = 443 },
# Uncomment cert and key paths if using HTTPS
]
# Save and exit Step 5: Create Systemd Service
# Create service file
sudo nano /etc/systemd/system/xo-server.service
# Add content:
[Unit]
Description=Xen Orchestra Server
After=network-multi.user.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/xen-orchestra/packages/xo-server
ExecStart=/usr/bin/yarn start
Restart=on-failure
[Install]
WantedBy=multi-user.target
# Save and exit
# Reload systemd
sudo systemctl daemon-reload
# Enable and start XO
sudo systemctl enable xo-server
sudo systemctl start xo-server
# Check status
sudo systemctl status xo-server
# Should show "active (running)" Step 6: Access XO
Browser: http://192.168.1.105
First-time setup:
Create admin account
Email: [email protected]
Password: [strong password]
Dashboard loads - ready to add XCP-ng hosts Step 7: Add XCP-ng Hosts
Settings (gear icon) → Servers → Add Server:
Host: 192.168.1.100
Username: root
Password: [XCP-ng root password]
Label: xcp-ng-host1
Auto-connect: Yes
Unauthorized certificates: Accept (for self-signed)
Connect
XO discovers all resources and displays in dashboard Section 4: Creating and Managing VMs
Creating VM from Template
Via Xen Orchestra:
Home → New VM:
Template: Ubuntu Jammy Jellyfish 22.04
Name: web-server-01
Description: Nginx web server
Resource Pool: [your pool]
CPU: 2 vCPUs
RAM: 4 GB
Disk:
- SR: Local storage
- Size: 50 GB
- Boot disk: Yes
Network:
- Network: Pool-wide network
- MAC: Auto-generated
Advanced:
- Boot firmware: BIOS (UEFI for Windows 11)
- Video RAM: 8 MB
- Start VM after creation: Yes
Create
VM boots and starts OS installation Via xe CLI:
# SSH to XCP-ng host
# List available templates
xe template-list | grep name-label
# Get template UUID
TEMPLATE=$(xe template-list name-label="Ubuntu Jammy Jellyfish 22.04" --minimal)
# Get SR UUID
SR=$(xe sr-list name-label="Local storage" --minimal)
# Create VM from template
VM=$(xe vm-install template-uuid=$TEMPLATE new-name-label="web-server-01" sr-uuid=$SR)
# Configure VM
xe vm-param-set uuid=$VM VCPUs-max=2 VCPUs-at-startup=2 memory-static-max=4GiB memory-dynamic-max=4GiB memory-dynamic-min=2GiB
# Start VM
xe vm-start uuid=$VM Installing Guest Tools (xe-guest-utilities)
Essential for:
- Proper VM shutdown
- Performance metrics
- Time synchronization
- Network information reporting
Linux VMs:
# SSH to Linux VM
ssh user@vm-ip
# Ubuntu/Debian
sudo apt update
sudo apt install xe-guest-utilities -y
# RHEL/CentOS/Rocky
sudo yum install xe-guest-utilities-latest -y
# Verify installation
sudo systemctl status xe-linux-distribution Windows VMs:
1. In Xen Orchestra: VM → Console → Mount guest tools
2. In Windows VM: Browse to CD drive
3. Run managementagentx64.msi (or x86 for 32-bit)
4. Follow installer prompts
5. Reboot VM
Verify: Device Manager → XenServer PV Drivers visible VM Snapshots and Backups
Creating Snapshots:
Via XO:
VM → Snapshots → New Snapshot:
Name: pre-update-snapshot
Description: Before system updates
Create
Snapshot creation: 10-30 seconds
Can revert to snapshot or create new VM from it Via xe CLI:
# Create snapshot
SNAPSHOT=$(xe vm-snapshot vm="web-server-01" new-name-label="pre-update")
# List snapshots
xe snapshot-list | grep web-server-01
# Revert to snapshot
xe snapshot-revert snapshot-uuid=$SNAPSHOT
# Delete snapshot
xe snapshot-uninstall snapshot-uuid=$SNAPSHOT force=true Continuous Replication (XO Feature):
Home → Backup → New → Continuous Replication:
VMs: Select web-server-01
Remote: Choose remote XCP-ng host or SR
Schedule: Every 1 hour
Retention: Keep 24 replicas
Save
Creates continuous backup to remote location
Allows failover to replica in disaster scenarios Delta Backups:
Home → Backup → New → Backup:
VMs: Select multiple VMs
Remote: NFS/SMB backup target
Schedule: Daily at 2:00 AM
Depth: 7 (keep 7 daily backups)
Mode: Delta backup
Save
First backup: Full export
Subsequent backups: Only changed blocks
Drastically faster and more efficient than full backups Section 5: Resource Pools and High Availability
Creating a Resource Pool
A pool is a collection of XCP-ng hosts managed as a single entity.
Prerequisites:
- Multiple XCP-ng hosts (minimum 2, recommended 3)
- Same version of XCP-ng on all hosts
- Shared storage (NFS, iSCSI, or local with replication)
- Network connectivity between hosts
Step 1: Prepare Second Host
# Install XCP-ng on second server (xcp-ng-host2)
# Use same process as host1
# Network: 192.168.1.101
# Ensure time sync (NTP) Step 2: Create Pool (via XO)
Home → Pools → New Pool:
Master: xcp-ng-host1 (192.168.1.100)
Name: homelab-pool
Description: Main homelab resource pool
Create Pool
Pool created with xcp-ng-host1 as master Step 3: Join Host to Pool
Home → Hosts → xcp-ng-host2 → Advanced → Join pool:
Master: xcp-ng-host1
Pool: homelab-pool
Join Pool
xcp-ng-host2 reboots and joins pool
All hosts now managed as single entity Via xe CLI (Alternative):
# On host2 (joining host)
ssh [email protected]
# Join pool (master IP: 192.168.1.100)
xe pool-join master-address=192.168.1.100 master-username=root master-password=[master-password]
# Host reboots and joins pool Configuring Shared Storage
NFS Storage Repository:
# On NFS server (TrueNAS, Synology, Linux NFS)
# Create NFS share: /mnt/pool/xcp-ng-vms
# Export: 192.168.1.0/24 (rw,sync,no_root_squash)
# On XCP-ng (via XO):
Home → Storage → New Storage:
Type: NFS
Name: nfs-vm-storage
Server: 192.168.1.50
Path: /mnt/pool/xcp-ng-vms
Advanced: Use thick provisioning (optional)
Create
SR available on all pool members
Enables live migration between hosts iSCSI Storage Repository:
Home → Storage → New Storage:
Type: iSCSI
Name: iscsi-vm-storage
Target: 192.168.1.60:3260
IQN: iqn.2025-01.local.truenas:xcp-ng-target
LUN: 0
Multipath: Yes (if supported)
Create
Provides block-level storage for VMs
Better performance than NFS for databases Implementing High Availability
HA automatically restarts VMs on surviving hosts if a host fails.
Step 1: Enable HA
Home → Pools → [your pool] → Advanced → High Availability:
Enable HA: Yes
Heartbeat SR: Select shared storage SR
Max restarts: 3
Max restart time: 300 seconds
Enable
HA monitors hosts and VMs
Automatic failover configured Step 2: Configure VM for HA
VM → Advanced → High Availability:
HA Priority: Restart if possible
Restart delay: 60 seconds
Order: 1 (lower number = higher priority)
Save
VM protected by HA
Will restart on surviving host if current host fails Step 3: Test HA
# Simulate host failure
ssh [email protected] # Host2
reboot
# Watch HA behavior in XO:
# 1. Pool detects host2 offline (30-60 seconds)
# 2. VMs on host2 marked as "needs restart"
# 3. VMs restart on host1 (or host3)
# 4. Total downtime: 2-5 minutes Section 6: Migrating from VMware ESXi
Planning the Migration
Pre-Migration Checklist:
✓ Document all VMs (name, specs, network, storage)
✓ Identify dependencies and boot order
✓ Check VM compatibility (Windows, Linux versions)
✓ Plan network mapping (VMware to XCP-ng)
✓ Prepare sufficient storage on XCP-ng
✓ Schedule maintenance window
✓ Create rollback plan Migration Methods:
- OVF/OVA export and import
- Disk-level conversion (dd, qemu-img)
- Third-party tools (XO migration plugin)
- Cold migration (shutdown, copy, convert)
Method 1: OVF Export from VMware
Step 1: Export VM from ESXi
VMware vSphere Client:
1. Shutdown VM
2. Right-click VM → Export → Export OVF Template
3. Format: OVF (not OVA)
4. Name: web-server-vmware
5. Save to accessible location
Export creates:
- .ovf (descriptor file)
- .vmdk (virtual disk)
- .mf (manifest) Step 2: Convert VMDK to VHD
# On workstation with qemu-img installed
sudo apt install qemu-utils # Ubuntu
brew install qemu # macOS
# Convert VMDK to VHD
qemu-img convert -f vmdk -O vpc web-server-vmware-disk1.vmdk web-server-xcp.vhd
# Large VMs may take 30+ minutes
# Monitor progress with pv if available:
pv web-server-vmware-disk1.vmdk | qemu-img convert -f vmdk -O vpc - web-server-xcp.vhd Step 3: Import VHD to XCP-ng
# Copy VHD to XCP-ng host
scp web-server-xcp.vhd [email protected]:/tmp/
# SSH to XCP-ng
ssh [email protected]
# Get SR UUID
SR=$(xe sr-list name-label="Local storage" --minimal)
# Import VHD as new VM
xe vm-import filename=/tmp/web-server-xcp.vhd sr-uuid=$SR
# This creates VM with disk from VHD
# Configure network, RAM, CPU as needed
# Start VM
xe vm-start vm="web-server-vmware" Method 2: Live Migration with XO Plugin
Using Xen Orchestra Migration Plugin:
XO → Settings → Plugins → Migration:
Enable VMware migration plugin
Configure vCenter credentials:
vCenter: vcenter.homelab.local
Username: [email protected]
Password: [password]
Connect
XO discovers VMware VMs Migrate VM:
Home → Migrate from VMware:
Source VM: Select VM from VMware list
Destination Pool: homelab-pool
SR: nfs-vm-storage
Network: Map VMware network to XCP-ng network
Options:
- Power off source VM: Yes (recommended)
- Delete source VM: No (keep until verified)
- Install guest tools: Yes
Migrate
Migration process:
1. Powers off VMware VM
2. Exports disk
3. Converts to VHD
4. Creates XCP-ng VM
5. Imports disk
6. Configures network
7. Installs xe-guest-utilities
8. Starts VM
Duration: 10-60 minutes depending on disk size Post-Migration Tasks
Verify VM Functionality:
1. Boot migrated VM
2. Verify network connectivity
3. Check services started correctly
4. Verify disk space
5. Install xe-guest-utilities if not automatic
6. Update VMware Tools to xe-guest-utilities:
- Windows: Uninstall VMware Tools, install XCP-ng management agent
- Linux: Remove open-vm-tools, install xe-guest-utilities Optimize VM:
# Remove VMware-specific configurations
# Linux VMs:
sudo apt remove open-vm-tools # Ubuntu
sudo yum remove open-vm-tools # RHEL
# Windows VMs:
# Uninstall VMware Tools via Add/Remove Programs
# Install xe-guest-utilities (covered earlier)
# Adjust VM settings in XO:
# - CPU type: Host (for better performance)
# - Video RAM: Reduce if not needed
# - Optimize disk (VHD → thin provisioning if needed) Section 7: Advanced Features and Optimization
GPU Passthrough
Similar to Proxmox, XCP-ng supports PCIe passthrough:
Enable IOMMU:
# Edit grub
nano /etc/grub.cfg
# Add to kernel line:
intel_iommu=on # Intel
# or
amd_iommu=on # AMD
# Update grub
grub2-mkconfig -o /boot/grub/grub.cfg
# Reboot
reboot Passthrough GPU to VM:
# List PCI devices
lspci | grep -i vga
# Get device ID
# Example: 03:00.0 VGA compatible controller: NVIDIA...
# Pass to VM
xe vm-param-set uuid=[VM-UUID] other-config:pci=0/0000:03:00.0 Network Bonding and VLANs
Create Network Bond:
XO → Pools → [pool] → Network → New Bond:
Interfaces: eth0, eth1
Mode: LACP (802.3ad) or Active-Backup
MTU: 1500 (or 9000 for jumbo frames)
Create
Provides redundancy and increased bandwidth Configure VLANs:
XO → Pools → [pool] → Network → New Network:
Name: VLAN20-Production
VLAN: 20
Description: Production VMs
Link to: xenbr0 (or bonded interface)
Create
Assign to VMs via VM → Network → Select VLAN20-Production Performance Tuning
CPU Optimization:
VM → Advanced → CPU:
vCPU Topology:
Sockets: 1
Cores: 4
Threads: 1
CPU Mask: Pin to specific physical CPUs (advanced)
CPU Weight: Priority (default 256, higher = more priority) Disk Optimization:
# Use SSD/NVMe for database VMs
# Enable discard/TRIM
xe vbd-param-set uuid=[VBD-UUID] other-config:discard=true Conclusion
XCP-ng provides enterprise-grade virtualization without the enterprise price tag. From simple VM hosting to complex multi-host pools with HA, it delivers the features VMware users expect—completely free.
Key Takeaways:
- Xen hypervisor powers massive cloud platforms (AWS, Linode)
- Xen Orchestra provides powerful web-based management
- Migration from VMware is straightforward
- Resource pools enable centralized management
- HA and live migration ensure uptime
- All features free and open-source
Next Steps:
- Explore automated backups and replication
- Implement monitoring with Grafana
- Learn xe CLI for advanced scripting
- Join XCP-ng community forums
- Contribute to open-source development
Resources:
- XCP-ng Documentation: https://docs.xcp-ng.org
- Xen Orchestra Docs: https://xen-orchestra.com/docs/
- Community Forum: https://xcp-ng.org/forum/
- r/XcpNg: Reddit community
- YouTube: Lawrence Systems, TechnoTim
Welcome to XCP-ng. Your homelab just went enterprise.