PXE boot install
Environment
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
PXE boot doesn't support tagged VLAN networks! Be sure to boot on an untagged network!
Procedure
TFTP server configuration (BIOS boot)
- In your TFTP root directory (eg
/tftp), create a folder namedxcp-ng. - Copy the
mboot.c32andpxelinux.0files 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-ngdirectory on the TFTP server. - In the TFTP root directory, create a folder called
pxelinux.cfg. - In the
pxelinux.cfgdirectory, create your configuration file calleddefault.
The file itself will contain the way to install XCP-ng: manually (with answers to provide on the host console/screen) or fully automated (see Automated install).
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 the 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.efias the boot file. -
Create a
grub.cfgas follows: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,vgamodule2 /EFI/xcp-ng/vmlinuz console=hvc0 console=tty0 installmodule2 /EFI/xcp-ng/install.img} -
Copy this
grub.cfgfile to theEFI/xenserverfolder on the TFTP server. -
Get the following files from the XCP-ng ISO:
grubx64.efi,install.img(from the root directory),vmlinuz, andxen.gz(from the /boot directory) to the newEFI/xcp-ngdirectory on the TFTP server.
How the 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
Installation files
On the FTP, NFS or HTTP server, put all the installation media content in there.
For a layout example, check the official repository.
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.
Verification
After selecting boot from the Ethernet card, you should see the PXE menu you created before, and the XCP-ng installation starts from the network.