Run Windows inside a virtual machine on Linux for gaming
Since making the full time move to using Linux (Fedora) from Windows, I've found the migration fairly easy and haven't had much disruption in how I do my work.
However, there are some games I like to play such as Football Manager and some older games which rely on 3D rendering (either software or hardware). At the moment I have a VirtualBox VM running Windows XP and 95% of the games I've installed on this have failed to run due to problems with the graphics card (the virtual graphics card).
What I would like to do is get the VM to use the laptop's actual physical graphics card directly, or something similar. I know there is a performance issue, but most of the games I play are over 5 years old and I'm not bothered about graphic quality etc. I just want it to work.
I don't have to use VirtualBox, I just used it because I'm used to it. If VMWare or another virtual technology is a better option than VirtualBox then I will use it.
VMs, by definition, cannot use the actual graphics hardware. It's being used by the host so the guest can't use it too. That's just how it works. You can get better performance by installing the DirectX additions though.
You will need to install DirectX as an add-on for VirtualBox for it to work, but it does work.
To install DirectX, you need to boot the guest into safe mode. Boot your Windows VM into safe mode and go to VBoxGuest additions. Install the Direct3D additions. It has to be done in safe mode or it won't work.
https://www.dedoimedo.com/computers/virtualbox-3-directx.html
Install the VirtualBox Guest Additions on Windows, and enable "Display → 3D Acceleration" in the virtual machine properties.
You can actually pass through the graphics card to a windows guest, but you have to use something like Xen 4. The biggest caveats to this setup are that you need some patience and knowledge of hardware and linux, and the host OS cannot use the graphics card at the same time as the guests. Generally speaking, you need either scripts to manage moving your card from guest to host and back, or you just pipe it to the guest and access the host through ssh/cygwin X forwarding, etc. Not for the feint of heart, but shouldn't be more than a weekend project for an experienced tech. I have multiple graphics cards passed through to different guests using Xen 4 on top of Fedora, and it really wasn't that bad. Recompiling the kernel to add vt-d support was the thing that took the longest amount of time, but if you're comfortable recompiling your kernel, you should be able to get it to work.
The information out there about requiring FLReset/Function-level reset is old and bogus; neither of my devices have it and they work fine.