Preboot Execution Environment (PXE)
Network-based installations are especially useful when used together with a Preboot Execution Environment (PXE) server, which allows you to boot the installation program from the network as well.
The preboot execution environment (PXE) is an environment to boot computers using a network interface independently of available data storage devices or installed operating systems.
If you do not use gPXE, you might experience problems while booting the ESX installer on a heavily loaded network. TFTP is a light-weight version of the FTP service, and is typically used only for network booting systems or loading firmware on network devices such as routers. TFTP is not a robust protocol and is sometimes unreliable for transferring large amounts of data.
PXELINUX is part of the SYSLINUX package. Many Linux distributions include it. Many versions of PXELINUX also include gPXE. Some distributions, such as Red Hat Enterprise Linux version 5.3, include older versions of PXELINUX that do not include gPXE.
In order for PXE booting to work with the builtin server in Virtualbox you need to configure your VM's network settings and boot order properly.
PXE functionality is built into the NAT network mode of the VirtualBox.
# VirtualBox will use the pxelinux.0 file as the PXE file for that VM.
# default PXE file
VBoxManage modifyvm "MachineName" --nattftpfile1 /pxelinux.0
You can also change the boot order to have the Network as the first option (System → Motherboard → Boot Order).
The PXE configuration file defines the menu displayed to the target host as it boots up and contacts the TFTP server. The TFTP server is always listening for PXE clients on the network. When it detects that a PXE client is asking for PXE services, it sends the client a network package that contains this boot menu.
Each PXE boot menu selection points to the location of the kernel and ramdisk files. You can create:
PXE booting is now supported in NAT mode. The NAT DHCP server provides
a boot file name of the form vmname.pxe if the directory TFTP exists
in the directory where the user's VirtualBox.xml file is kept. It is the responsibility
of the user to provide ''vmname.pxe''.
pxe file must be located here:
# On linux
~/.config/VirtualBox/TFTP/
# On OSX it is
~/Library/Virtualbox/TFTP
label scripted
menu label Scripted Installation
kernel test/vmlinuz
append initrd=test/initrd.img vmkopts=debugLogToSerial:1 mem=512M ks=nfs://xx.xx.xxx.xx/ks.cfg
where:
The kernel image and ramdisk directory contains files that that must be loaded across the network to enable PXE booting of the VM installer.
The kernel image and ramdisk directory is located on a Web server or on the TFTP server in the /tftpboot directory For example, the directory might be at /tftpboot/esx/ and contain the following files:
These files come from the ESX installation DVD, under the /isolinux directory.
You reference the vmlinuz and initrd.img files from the PXE configuration file.
The initial boot file pxelinux.0 or gpxelinux.0 tries to load a PXE configuration file.
File Location for the PXE Configuration File