Expose GPU from Windows 10 host to Ubuntu 16

I need to fully expose my GPU to a VM that run Ubuntu 16. The host is Windows 10. I am using Oracle VirtualBox. However, I do not mind change to another VM program if it will make it work.

Any suggestion?


Solution 1:

Giving the guest full GPU access is probably not possible. If a virtual machine had direct access to your GPU, bad stuffs would happen because sharing memory between two effectively different computers is not a thing; pointers and addresses and whatnot would be very different between them. (No consumer-available card supports servicing two computers at once.)

There are, however, some things you can try. First, set your preferred graphics processor to the good one in the NVidia Control Panel (3D Settings → Manage 3D settings → Preferred graphics processor). That might make VirtualBox go with the NVidia card for OpenGL.

If that doesn't help, try installing Guest Additions in Safe Mode on the guest.

There is also the concept of GPU passthrough, but it is touted to work better work on Nix based hosts. You can get a fair setup guide here.

Solution 2:

Windows is not able to pass the GPU to Ubuntu. However, you can run Ubuntu instead, and pass the GPU to Windows.

Windows Server 2016 with Hyper-V 2016 can pass GPU to VMs. It is the ONLY Windows IS to be able to do so.