How to install XCP-ng.
💿 ISO installation
If you want to use the netinstall ISO, see the Netinstall section.
Download and create media
You can download the latest 8.2 ISO here: https://mirrors.xcp-ng.org/isos/8.2/xcp-ng-8.2.1-20231130.iso?https=1.
SHA256 checksums, GPG signatures and net-install ISO are available here.
Then, create the install media (e.g. a USB key 1GB or larger should work):
dd if=xcp-ng-8.2.1-20231130.iso of=/dev/sdX bs=8M oflag=direct
Finally, boot on that media and go to the next section.
On Windows, you can use Rufus to create the bootable USB stick.
Start the host
Start the host and boot on the USB media.
Follow instructions
1. UEFI vs BIOS
Boot screens are just slightly different on start between BIOS and UEFI mode:
BIOS splash screen:
UEFI splash screen:
warning
NEVER switch from UEFI to BIOS (or vice-versa) after you installed XCP-ng. Stick to the mode that you chose during the install.
2. Language selection
3. Welcome
4. EULA/license
5. Disk selection
This is the screen where you'll select where XCP-ng system will be installed. XCP-ng is a specialized Linux distribution, so you need to dedicate a physical disk to it. Partitioning is done automatically.
Alternatively, if you have two identical disks, you can use Software RAID (mdadm
) :
tip
If only one disk is found suitable for the installation, this step is skipped. The name of the device will be displayed to you in the "Confirm Installation" step, later in the process.
6. VM storage selection
This is the place where your VM disks will be stored. It's called a Storage Repository (SR). It can use the same disk you installed the system on. It will automatically use the free space after system partitions.
tip
EXT instead of LVM? We advise to use EXT to benefit from thin provisioning!
warning
When the installer skips step 5 automatically, users sometimes mistake this step with the selection of the system disk.
7. Installation source
If you use the default ISO, just select "Local media":
Then, you can verify your media or not:
8. Host password
This will be the root password, used to connect to the host with SSH and XAPI.
9. Networking
Here you can select between DHCP and static network, even using a VLAN:
10. Hostname and DNS
Configure the hostname of your server and the DNS resolvers.
11. Timezone and time
warning
ALWAYS use a NTP server. It's a critical component to manage your host(s). If you don't know any NTP server, you can use pool.ntp.org
.
12. Installation
warning
After this step, data will be written on the disk(s)! Check the listed device(s) one last time.
13. Supplemental packs and end of install
Not relevant in almost all cases. Skip it:
tip
"Completing installation" is in fact installing the bootloader and building the initramfs. It can take time.
14. Reboot
After a reboot, you should see the GRUB menu:
It means the system is correctly installed! Enjoy XCP-ng 🚀
🌐 Netinstall
The netinstall image is a lightweight ISO (around 150MiB) that will only contain the installer, but no actual RPM packages. Sometimes, it's more convenient/faster when your ISO is on a slow connection (e.g. a virtual media using a server IPMI).
You can download it on this URL: https://mirrors.xcp-ng.org/isos/8.2/xcp-ng-8.2.1-20231130-netinstall.iso?https=1.
As with the regular installation ISO, write it on a USB media:
dd if=xcp-ng-8.2.1-20231130-netinstall.iso of=/dev/sdX bs=8M oflag=direct
Everything else is like the regular install, except that it will not offer to install from local media, only from distant ones.
🎬 PXE boot install
Requirements
To get XCP-ng installed from PXE, you need:
- DHCP and TFTP configured servers
- Any NFS, FTP or HTTP server (your choice) to host XCP-ng installation files
- A PXE-boot compatible network card on your host
tip
PXE boot doesn't support tagged VLAN networks! Be sure to boot on a untagged network!
TFTP server configuration
TFTP server configuration - BIOS boot
- In your TFTP root directory (eg
/tftp
), create a folder namedxcp-ng
. - Copy the
mboot.c32
andpxelinux.0
files from the installation media to the TFTP root directory. - From the XCP-ng installation media, copy the files
install.img
(from the root directory),vmlinuz
, andxen.gz
(from the /boot directory) to the newxcp-ng
directory on the TFTP server. - In the TFTP root directory, create a folder called
pxelinux.cfg
- In the pxelinux.cfg directory, create your configuration file called
default
.
The file itself will contain the way to install XCP-ng: manually (with answer to provide on the host console/screen) or fully automated (see Automated install below).
Here is an example of a manual installation:
default xcp-ng
label xcp-ng
kernel mboot.c32
append xcp-ng/xen.gz dom0_max_vcpus=2 dom0_mem=2048M,max:2048M com1=115200,8n1 console=com1,vga --- xcp-ng/vmlinuz xencons=hvc console=hvc0 console=tty0 --- xcp-ng/install.img
How TFTP folder looks like when configured
tree -L 1 /srv/tftp/
srv/tftp
├── mboot.c32
├── pxelinux.0
├── pxelinux.cfg
│ └── default
└── xcp-ng
├── install.img
├── vmlinuz
└── xen.gz
TFTP server configuration - UEFI boot
If you want to make an installation in UEFI mode, you need to have a slightly different TFTP server configuration:
- In your TFTP root folder, create a directory called
EFI/xcp-ng
- Configure your DHCP server to provide
/EFI/xcp-ng/grubx64.efi
as the boot file - Create a
grub.cfg
as follow:
menuentry "XCP-ng Install (serial)" {
multiboot2 /EFI/xcp-ng/xen.gz dom0_mem=2048M,max:2048M watchdog \
dom0_max_vcpus=4 com1=115200,8n1 console=com1,vga
module2 /EFI/xcp-ng/vmlinuz console=hvc0 console=tty0 install
module2 /EFI/xcp-ng/install.img
}
- Copy this
grub.cfg
file toEFI/xenserver
folder on the TFTP server - Get the following files from XCP-ng ISO:
grubx64.efi
,install.img
(from the root directory),vmlinuz
, andxen.gz
(from the /boot directory) to the newEFI/xcp-ng
directory on the TFTP server.
How TFTP folder looks like when configured
tree -L 1 /srv/tftp/
srv/tftp
└── EFI
├── xcp-ng
│ ├── grubx64.efi
│ ├── install.img
│ ├── vmlinuz
│ └── xen.gz
└── xenserver
└── grub.cfg
On the FTP, NFS or HTTP server, get all the installation media content in there.
For layout example check the official repository.
tip
When you do copy the installation files, DO NOT FORGET the .treeinfo
file. Double check your webserver isn't blocking it (like Microsoft IIS does).
On the host
- Start your host
- Enter the boot menu (usually F12)
- Select boot from the Ethernet card
- You should see the PXE menu you created before!
✨ iPXE over HTTP install
This guide is for UEFI boot, using iPXE over an HTTP server to serve files needed for installation.
Requirements
To get XCP-ng installed from iPXE over HTTP, you need:
- An HTTP server to host XCP-ng installation files
- A iPXE compatible network card and iPXE firmware on your host
- In your HTTP root directory copy the contents of the net install ISO.
The top-level should look like this:
tree -L 1 /path/to/http-directory/
.
├── EFI