How to enable NVidia Optimus drivers so that VM’s may have hardware graphics acceleration

Take a look at the great instructions here for installing Bumblebee which will enable Optimus (Non-discrete NVidia GPU) drivers in Linux. Esentually the below (Note OS version, in this case Fedora 25):

sudo dnf -y --nogpgcheck install
sudo dnf -y --nogpgcheck install
sudo dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel


Now on the VMware Workstation application launcher (To open the KDE Menu Editor, Right-Click on the Fedora start menu icon and select “Edit Applications…”), prefix the launch command with “optirun”:

Last, edit the VMware Workstation preferences to allow blacklisted drivers:

sudo nano /home/dave/.vmware/preferences

Add the following to the end of the file: = "TRUE"

Start VMware Workstation and make sure to edit the settings of the VM to enable hardware accelerated graphics. The above file edit can be done individually per VM too in the VM’s .vmx file with the same entry.