Install XCP-ng | XCP-ng Documentation (2024)

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.

tip

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:

Install XCP-ng | XCP-ng Documentation (1)

UEFI splash screen:

Install XCP-ng | XCP-ng Documentation (2)

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

Install XCP-ng | XCP-ng Documentation (3)

3. Welcome

Install XCP-ng | XCP-ng Documentation (4)

4. EULA/license

Install XCP-ng | XCP-ng Documentation (5)

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.

Install XCP-ng | XCP-ng Documentation (6)

Alternatively, if you have two identical disks, you can use Software RAID (mdadm) :

Install XCP-ng | XCP-ng Documentation (7)

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.

Install XCP-ng | XCP-ng Documentation (8)

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":

Install XCP-ng | XCP-ng Documentation (9)

Then, you can verify your media or not:

Install XCP-ng | XCP-ng Documentation (10)

8. Host password

This will be the root password, used to connect to the host with SSH and XAPI.

Install XCP-ng | XCP-ng Documentation (11)

9. Networking

Here you can select between DHCP and static network, even using a VLAN:

Install XCP-ng | XCP-ng Documentation (12)

10. Hostname and DNS

Configure the hostname of your server and the DNS resolvers.

Install XCP-ng | XCP-ng Documentation (13)

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.

Install XCP-ng | XCP-ng Documentation (14)

Install XCP-ng | XCP-ng Documentation (15)

Install XCP-ng | XCP-ng Documentation (16)

12. Installation

warning

After this step, data will be written on the disk(s)! Check the listed device(s) one last time.

Install XCP-ng | XCP-ng Documentation (17)

Install XCP-ng | XCP-ng Documentation (18)

13. Supplemental packs and end of install

Not relevant in almost all cases. Skip it:

Install XCP-ng | XCP-ng Documentation (19)

Install XCP-ng | XCP-ng Documentation (20)

tip

"Completing installation" is in fact installing the bootloader and building the initramfs. It can take time.

Install XCP-ng | XCP-ng Documentation (21)

14. Reboot

After a reboot, you should see the GRUB menu:

Install XCP-ng | XCP-ng Documentation (22)

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

  1. In your TFTP root directory (eg /tftp), create a folder named xcp-ng.
  2. Copy the mboot.c32 and pxelinux.0 files from the installation media to the TFTP root directory.
  3. From the XCP-ng installation media, copy the files install.img (from the root directory), vmlinuz, and xen.gz (from the /boot directory) to the new xcp-ng directory on the TFTP server.
  4. In the TFTP root directory, create a folder called pxelinux.cfg
  5. 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:

  1. In your TFTP root folder, create a directory called EFI/xcp-ng
  2. Configure your DHCP server to provide /EFI/xcp-ng/grubx64.efi as the boot file
  3. 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
}
  1. Copy this grub.cfg file to EFI/xenserver folder on the TFTP server
  2. Get the following files from XCP-ng ISO: grubx64.efi, install.img (from the root directory), vmlinuz, and xen.gz (from the /boot directory) to the new EFI/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

  1. Start your host
  2. Enter the boot menu (usually F12)
  3. Select boot from the Ethernet card
  4. 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
  1. 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
Install XCP-ng | XCP-ng Documentation (2024)

References

Top Articles
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 5861

Rating: 4.2 / 5 (43 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.