Ok so I run Linux on my main system and all is great. However I enjoy playing games on my computer and despite that the Linux offering for games is getting much better all of the time there are many games that are Windows only. So a couple of years ago I read about a way to solve this dilemma. Run Windows in a VM and use VGA Passthrough to give the VM full control of the graphics card.
Well after months of faffing about I got a Windows VM set-up and then a few months after I got a Linux one set-up. I won’t cover the full steps here, ~I used the following tutorial which worked really well for me (using Nvidia graphics card) https://bufferoverflow.io/gpu-passthrough/ I did discover a couple of other little “gotchas” that I wanted to record here so that I don’t lose them:
For the Windows VM
You need to install the VirtIO drivers within Windows to make sure you get full performance out of hardware. Redhat make these drivers available for download here.
Something else I had to do to get good sound audio was install an old AC97 audio driver and after that crystal clear sound quality. Getting this done was a bit of a nightmare but I did answer a question on Stack Overflow about this issue and those instructions still stand Crystal Clear Audio in Windows. The original YouTube video I found that showed me how to do it has disappeared but at least I wrote out those instructions 🙂
For Windows that was pretty much it, make sure to install the latest graphics card drivers and if you get stuck look on forums.
For the Linux VM
This one was a bit more tricky and required some more steps, I do need to point out that these steps were relevant the first time I installed the Linux VM (Mint 17.3 Mate) but my most recent time (with mine 18.1 Mate) I didn’t have to faff about with the nomodeset stuff or anything on the EFI command line. The very last step about changing the name of grubx64.efi still applies though. This is not so bad as you can manually navigate to that file in the EFI “settings screen” (press F12 on a reboot and in those options you can select the hard drive and the boot file) :
- Set nomodeset as kernel parameter
- Run Live CD and Install (antergos not work, Mint did)
- in Live CD chroot into new install and add nomodeset param to grub default file then update-grub – http://askubuntu.com/questions/145241/how-do-i-run-update-grub-from-a-livecd
- Then load up VM without live CD and wait for EFI Shell to kick in
- Change directory to FS0:\ and cd into fs0:\efi\ubuntu\grubx64.efi and run the file – http://askubuntu.com/questions/566315/virtualbox-boots-only-in-uefi-interactive-shell
- Once In – Mount the boot partition and rename the grubx64.efi to /EFI/boot/bootx64.efi (or whatever the efi boot needs) this is in a comment on that page.
Well that is it, this was one monster of a project to get working but I am so glad I have. I now have Linux as my main system and if I ever need it Windows is a command away. I do have to have 2 mine and keyboard plugged in just to make sure I can still access the host system if things go wrong but that is a small price to pay.
Thought I would add I use a GTX-970 and whilst haven’t benchmarked to discover how good the VM compares to bare metal but the performance is bloody brilliant.