After successfully enabling and persisting the passthrough of the iGPU for the latest Intel NUC 10 (Frost Canyon), I thought it was worth experimenting with the Apple Mac Mini 2018 to see if the same could be accomplished with its iGPU, which is an Intel UHD 630. The biggest benefit in addition to unlocking the iGPU for general use is support for Apple's Metal API which gives developers access to the underlying GPU when building and testing MacOS and iOS applications. This is also quite timely as the Apple Mac Mini 2018 was just added to the VMware HCL!
My initial attempt failed when using the latest ESXi 6.7 Update 3 release. After enabling passthrough of the iGPU and rebooting the ESXi host for the change to take affect, the system would get stuck during boot up when loading the dma_iommu_mapper module. After speaking with Engineering, the issue is probably not related to dma_iommu_mapper module but some other module shortly after but without serial console output or ability to see terminal screen, it would be very difficult to debug the issue.
About to give up, my last attempt was try ESXi 7.0 and to my surprise the ESXi host fully booted up after enabling passthrough of the iGPU. It is still not clear on what might be causing the problem for 6.7 but at least 7.0 works!
Note: To be able to successfully power on a MacOS VM running on ESXi 7.0, ensure you have applied the recent ESXi 7.0b patch. You will need to go to the VMware Patch Portal siteto download and apply the update.
Step 1- Enable passthrough of the iGPU using the vSphere UI and then reboot for changes to take affect.
Step 2 - Navigate to Configure->Hardware->Graphics->Host Graphics and change the default graphics type to "Shared Direct"
Step 3 - Create a new MacOS VM and install MacOS, I used MacOS 10.15 Catalina. Ensure that the VM is configured with vSphere 7 Compatibility (aka vHW 17) which is required to use the new Dynamic Direct Path I/O feature. If you are using an older version of vSphere or earlier VM Compatibility, the legacy Direct Path I/O should still work.
Note: One important thing to be aware of _before_ you attach the iGPU to the MacOS VM is to enable either Apple Remote Desktop and/or SSH. The reason is that I found after powering on the VM with the iGPU attached, the VM Console no longer functions and simply goes "black". The VM is fully functional but you just will not be able to use the VM Console for any type of access and this looks to be a limitation for now.
Step 4 - After you have installed MacOS and enable remote management, you can then attach the iGPU as shown in the screenshot below and using the new Dynamic DirectPath I/O feature introduced in vSphere 7.
Step 5 - To ensure the passthrough configurations are persisted, we must disable the claiming of the VGA driver by the VMkernel as explained in the previous article, run the following ESXCLI command:
esxcli system settings kernel set -s vga -v FALSE
You can always re-enable this as long as you have access to ESXi host. At this point, you do not have to reboot the ESXi host but the next time it goes through a reboot the iGPU passthrough settings will now persist.
Here screenshot of accessing the MacOS VM via SSH and using the system_profiler utility to show our iGPU:
Lastly, I was able to also get the iGPU passthrough working with the recently announced MacOS 11 (Big Sur) Beta 1 release. For more details on installing Big Sur on ESXi, please see this blog post for more details.