YO!
So I recently had the requirement to pass a physical graphics card through directly to a virtual machine in VMware. I’d never done this before so I was a little apprehensive at first. Especially when I’ve tried to do the same thing in HyperV.
Honestly, why do people even use HyperV???
Lets hop it!
So I’ll be setting this up directly in VMware ESXi as I don’t have vSphere.
1 First things first, login to ESXi and go to this path:
Host -> Manage -> Hardware -> PCI Devices
Here, you will see a long list of all the PCI devices connected to your system.
Find your GPU, highlight it and select toggle passthrough. It should show as ‘Active’ and might require a reboot:
2 Now we need to assign the GPU to our required VM.
Edit the VM settings, select Add Other Device and chose PCI device:
Then make sure your GPU is selected in the drop down menu:
3 Finally, we need to tell the VM to initialise the GPU.
Stay in the VM settings but this time go into VM Options -> Advanced -> Edit Configuration.
Search for a value key of:
hypervisor.cpuid.v0
If it exists, make sure it’s set to FALSE. If it doesn’t exist, create it and also set it to FALSE.
4 Done!
Save the config and boot the virtual machine up! You’ll likely need to install any drivers before it functions correctly.
Enjoy! 🎉