Once we set up the virtual machine, we can use the built-in PXE server of VirtualBox for PXE boot using the NAT network. To use the built-in PXE server, we need to set it up using the following steps:
- Create a $HOME/.VirtualBox/TFTP folder. The built-in TFTP root is at $HOME/.VirtualBox/TFTP on Linux or %USERPROFILE%\.VirtualBox\TFTP on Windows.
- Usually, the default boot image name is pxelinux.0 for PXE boot, but it is vmname.pxe for the VirtualBox built-in PXE. For example, if we use pxeAndroid as the virtual machine name, we have to make a copy of pxelinux.0 and name it pxeAndroid.pxe under the TFTP root folder.