virtualbox uefi PXEBoot

6,516

Solution 1

I've managed to solve this. Actually it comprises of two issues.

  1. VirtualBox doesn't support PXEBooting when EFI is enabled
  2. Using bare metal machine showed that DHCP requests are being sent but proxyDHCP "additional" responses are not processed (EFI PXEBoot failure). It turned out that it is an issue with dnsmasq - min version to support EFI is 2.76

Solution 2

Using Virtualbox 6.1 following worked for me. On the machine settings do following:

  • "System->Enable EFI"
  • "Network->Advanced->Adapter Type: Paravirtualized Network (virtio-net)".

With this, it by default boots into UEFI shell. Type exit, which brings up a Boot Manager menu. In that menu, chose UEFI PXEv4 from the Boot Manager and you'll see a new screen that says

>>Start PXE over IPv4.

Then it will boot into your grub.cfg. To make the VM automatically boot over PXE, you need to go into boot menu and change boot order.

Note that to see UEFI PXEv4, I specifically had to chose Paravirtualized Network adapter. None other worked.

Share:
6,516

Related videos on Youtube

lakier
Author by

lakier

Updated on September 18, 2022

Comments

  • lakier
    lakier almost 2 years

    I have successfully managed to setup PXEboot environment (based on foreman) with BIOS based systems. I could do the same with virtualbox using default BIOS subsystem.
    As UEFI starts to be more and more popular I would like to PXEBoot UEFI-based systems.

    I see that there is setting in Virtualbox to "enable EFI"
    I have grubx64.efi on my TFTP server and ProxyDHCP ready to send this as option

    But after starting such EFI-enabled VM, some strange shell appears that lists couple of BLK*: devices and that's it...
    How to even request the boot file from TFTP using this shell (I see no DHCP traffic)?

    I found some hints about edit startup.nsh but I don't have such file on none of my BLK devices

  • Pablo
    Pablo over 5 years
    That sucks, I wanted to test my grub.cfg for PXEBooting with EFI. Thanks for the info.
  • Martin
    Martin over 3 years
    This also worked for me to UEFI PXE boot VirtualBox VMs under vbox 6.1, thanks!
  • Martin
    Martin over 3 years
    Virtualbox 6.1 does support EFI PXE boot now, so this should no longer be the accepted answer.