My Try At GPU Passthrough on Fedora 25

THE BUILD

MOTHERBOARD: Asus Prime Z270-A
CPU: Intel Core i7-7700K Kaby Lake Quad-Core 4.2 Ghz
RAM: Corsair Vengeance LPX 32GB (2 x 16GB) DDR4
GPU: MSI GeForce GTX 1080 8GB
SSD1(Main): Samsung 850EVO 500GB
SSD2(VM): Crucial MX300 275GB SSD
PSU: EVGA SuperNOVA 650 80+ Gold
CASE: NZXT H440 Steel Mid Tower Case

A Little Back-story

So it has been about six years since I built my current PC and it was time for an upgrade. However, with my growing annoyance with Windows and becoming more and more interested in using Linux full time I decided that instead of just upgrading my old PC I should just build a whole new one. Thus, I decided to build a PC that would allow me to use a Linux distro full time but still allow me to have quick access to Windows for my games. This way I wouldn’t have to worry about the downtime and constant rebooting of my PC that I would have to go through if I had decided to dual boot instead.

Seeing as how I’m writing this up several days after I’ve finished there might be a few things I forget here and there, but I’ll do my best to remember everything and included all the links that helped me get to the finish line. This is also less of a technical write up, as I followed a guide, and more of just a write up of how things went. So . . .


Lets Get Started

Well, first things first gotta put all the parts together then see if the PC post. Easy peasy, right? Andddddddddd I’ve already run into my first problem . . .

The original motherboard I wanted to use was an Asus Z170 which works with the new Kaby Lake cpu’s BUT it requires a bios update first, an update I can’t perform because I can’t get to the bios screen. So one quick trip to Amazon and a day later I have a Z270 motherboard, swapped out the motherboards hit the power button and . . . IT POSTS. Whoo. Now that I know the computer works the next step is . . .


Installing Linux
(Fedora 25)

I didn’t have any real reason for choosing Fedora, I had previously installed it onto my laptop to try out a Linux distro and heard that there might be a “easy button” for setting up GPU pass-through coming soontm, maybe, possibly.

Quick heads up to anyone installing Fedora with a Nvidia GPU if you go through the installation process with the GPU installed your going to end up, like me , spending some time ripping your hair out of your head wondering why the install process starts then just freezes at some point and never finishes. The solution I found to this was just unplugging the GPU then going through the install process and install Nvidia drivers once you get to the desktop and then plug the GPU back in and problem solved. After that its was just going through and installing everything else I wanted/needed.


The VM

The two articles that I used to walk myself through the process of blacklisting the GPU from the host, getting the VM set up and etc were this;


and

The first article is more geared toward the setting up of the Virtual Machine and the second just has some things that are more specific about setting up a Windows VM like drivers. The articles themselves are thorough and I didn't run into any problems. Hopefully if anyone tries to do this it goes as well for you as it did for me sans the motherboard problems.

If I had to do this all over again i would have, made sure to have the right motherboard for the first try, i would have also bought a 500GB or 1TB SSD for the VM SSD as 275GB gets filled up pretty fast with games, and lastly i would have set the storage type of the VM as qcow instead of raw since with qcow you can take snapshots of the VM. The only other issue i've had with the VM is that i need to have to keyboards and two mice. I tried to get around this by using synergy to pass the mouse between the VM and the Host but the network that virtmanager uses, macvtap, doesn't allow for Host to VM network communication. I tried to get around this by creating a bridged network and using that but it never worked no many how ways i tried it or how many different articles i looked up, but hey, on the bright side i have an excuse to by another mechanical keyboard.

5 Likes

Welcome to Fedora. It's lovely !

Nice to hear that GPU passthrough works on your system, my current computer is almost identical: same motherboard, same CPU and a GTX 1080.

I was planning to use GPU passthrough since I built it back in may, but I’ve been bussy and havent had time to work on it.

Thanks for the links, hope that the procedure doesnt change too much for Debian