ESXi boot from AHCI Passthru

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

turbo

Member
Mar 17, 2022
28
25
13
This is bit of an obscure topic, but I always wondered why you couldn't configure PCI passthru / VMDirectPath I/O on an AHCI controller and actually directly boot a VM from it.

It turns out to be a limitation that VMWare put into their VM EFI/BIOS, where it checks for their specific VID/PID combination inside the VmwAhciDxe module. Removing this check allows booting a VM directly from a disk connected to the AHCI controller.

I'd rather not distribute the modified binary, but I created a patch that utilizes UEFIPatch (v 0.28.0) that removes this limit, and figured I might as well document this somewhere where somebody might be able to use it some day :p

This was done on ESXi 8.0 U1 but I suspect the module code hasn't changed much from other versions.

The file to patch is /usr/lib/vmware/roms/EFI20-64.ROM, use this patch with UEFIPatch

# VmwAhciDxe do not fail on VID/PID mismatch
EE544096-04D3-40CA-9A0C-D4D9709A603B 10 P:d4ad15e00748b8030000000000008041:d4ad15e00748b8000000000000000041


You should get a result like "patch: replaced 16 bytes at offset 11C0h"

Stick the patched .rom file in the VM directory, and edit the vmx file with a line like this (or add a line in the advanced config editor)

efi20-64.filename = "vmw_efi20_patched_ahci.rom"
 
Jun 5, 2024
1
0
1
You are right, this is quite obscure.
But I needed it and you handed me the fix :D
I am using ESXi 7.0.3 so the rom file is EFI64.ROM and the config line is efi64.filename = "[patched filename]" but that was an easy one.

Many thanks!
I created an account here just to thank you!
 

turbo

Member
Mar 17, 2022
28
25
13
I'm glad this information could help someone! FWIW I am using this "in production" for an ESXi8/TrueNAS AIO setup and it has been working perfectly since last year.