Deploying ESXi 6.0/6.5 on UEFI machines

Do you mean “invalid magic number” like I posted or something you mentioned earlier?

When I use chainloader I get the same error as you, except error 15 (not found) (first line about parsing is the same for me).

I have also tried the boot.cfg via http and ftp and the same result.

As an aside, my BIOS boot works just fine for ESXi via syslinux. I have double/triple checked permissions, ownerships, etc.

I am working with a colleague who is far more proficient at Foreman than I am, he thinks its an issue with the boot loader(s). I tend to agree as using grub2 with linuxefi doesnt even get to the installer but chainloading the ESXi bootloader at least gets into the installation screen.

Also, have you modified your boot.cfg, taking out the slashes, adding prefix line, removing the cdrom portion of the kernelopt line? As a side note, I have also tried renaming bootx64.efi to mboot.efi and moving the .efi and boot.cfg files to the root of tftpboot as per ESXi documenation…no change (if anything worse).

I did also notice in the official documentation here for ESXi PXE that they specifically mention using iPXE for UEFI, which I can confirm works (though I have not tried adding/using iPXE under Foreman). I was able to UEFI boot the installer via iPXE on another system.

So I think our options are try and get grub2 and the ESXi bootloader and config to play nice, or leverage iPXE within Foreman. I haven’t found any decent documentation to explain how to use iPXE in Foreman however.

I will of course report back any findings, hopefully if you solve it you will share too as I have been at this for days, maybe longer and have little hair left to pull out. Thanks