When adding a GPU to a vSphere VM using PCI passthrough there are a couple of additional settings that need to be done or the VM won’t boot.
State
Failed - Module 'DevicePowerOn' power on failed.
Errors
Module 'DevicePowerOn' power on failed.
Failed to start the virtual machine.
PCIPassthru: total number of pages needed (XXXXXXX) exceeds the limit (XXXXXXX), failing
Module 'DevicePowerOn" power on failed
YYYY-MM-DDTHH:MM:SS In(05) vmx - PCIPassthru: Device 0000:5e:00.0 barIndex 0 type 2 realaddr 0xc4000000 size 16777216 flags 0
YYYY-MM-DDTHH:MM:SS
In(05) vmx - PCIPassthru: Device 0000:5e:00.0 barIndex 1 type 3 realaddr 0x33000000000 size 34359738368 flags 12YYYY-MM-DDTHH:MM:SS
In(05) vmx - PCIPassthru: Device 0000:5e:00.0 barIndex 3 type 3 realaddr 0x33800000000 size 33554432 flags 12YYYY-MM-DDTHH:MM:SS
In(05) vmx - PCIPassthru: Device has PCI Express Cap Version 2(size 60)YYYY-MM-DDTHH:MM:SS
In(05) vmx - PCIPassthru: Registered a PCI device for 0000:5e:00.0 vIRQ 0x11, physical MSI = Enabled (vmmInt = Enabled),IntrPin = 1
YYYY-MM-DDTHH:MM:SS
In(05) vmx - PCIPassthru: total number of pages needed (8400896) exceeds limit (5111808), failing
In(05) vmx - Module 'DevicePowerOn' power on failed.YYYY-MM-DDTHH:MM:SS
In(05) vmx - VMX_PowerOn: ModuleTable_PowerOn = 0YYYY-MM-DDTHH:MM:SS
In(05) svga - SVGA thread is exiting the main loopYYYY-MM-DDTHH:MM:SS
In(05) vmx - Destroying virtual dev for scsi0:0 vscsi=9048770243207189YYYY-MM-DDTHH:MM:SS
pciPassthru.use64bitMMIO = TRUE
pciPassthru.64bitMMIOSizeGB = "MMIO_Space_In_GB"
Example:
pciPassthru.use64bitMMIO = TRUE
pciPassthru.64bitMMIOSizeGB = 128
Below are the steps to determine the value of "MMIO_Space_In_GB" for the parameter "pciPassthru.64bitMMIOSizeGB":
Powers of 2 are 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024
pciPassthru.64bitMMIOSizeGB = 256 for a 80GB GPU
Here are some other useful configurations:
Incorrect value in parameter "pciPassthru.64bitMMIOSizeGB" may also fail to power on the VM, and the below errors can be seen in vmware.log:
Msg_post: Error
[msg.efi.pciMmioError] The Firmware could not allocate 134250496 KB of PCI MMIO Increase the size of PCI MMIO and try again