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
 }
4. Copy this grub.cfg file to EFI/xenserver folder on the TFTP server
5. 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!