ESXi显卡直通虚拟机无法开机,提示“失败 - 模块“DevicePowerOn”打开电源失败。”

问题现象
ESXi虚拟机直通显卡后,无法开机,提示“失败 - 模块“DevicePowerOn”打开电源失败。”

解决方法
编辑虚拟机设置-虚拟机选项-高级,增加配置参数pciPassthru.use64bitMMIO = True

其他参数(可选,未经测试)

pciPassthru.64bitMMIOSizeGB = 16 (variable depending on your GPU, see the links below for details. I don't know the effect of setting this too high which I did since I just copied what someone else entered.)
pciHole.start = 2048
svga.present = FALSE
svga.autodetect = FALSE (optional, I set mine to FALSE but it doesn't matter if you change this)
hypervisor.cpuid.v0 = FALSE (deprecated 7+. If you add this in 7.x, the vm will not load the GPU correctly. It will detect it but be disabled in device manager)

pciPassthru.64bitMMIOSizeGB计算方式

https://earlruby.org/tag/use64bitmmio/

64bitMMIOSizeGB值的计算方法是将连接到VM的所有GPU上的显存总量(GB)相加。如果总显存为2的幂次方,则将pciPassthru.64bitMMIOSizeGB设置为下一个2的幂次方即可。

如果总显存介于2的2次方之间,则向上舍入到下一个2的幂次方,然后再次向上舍入。

2的幂数是2、4、8、16、32、64、128、256、512、1024…

例如虚拟机直通两张24G显存的显卡,则64bitMMIOSizeGB应设置为128。计算方式为24*2=48,在32和64之间,先舍入到64,再次舍入到128

来源:https://hardforum.com/threads/esxi-with-pci-gpu-passthrough.2024237/