July 2016: This guide should still work with Ubuntu 16.04 and Debian 8
My Xeon-D system is certainly nice. However, why don't I just code on my (beautiful) 4K display and with my (LOUD) mechanical keyboard? Coding on Windows is not exactly very forgiving (font rendering, scaling, git, etc). Therefore, I want to install something different than Windows on the machine...
-Well, here are my attempts:
ESXi 6.0 with Mac Unlocker 2.0.7, Mac OS X with PCI-E Passthrough, cannot boot (bootloop)
Linux Mint, couldn't get nVidia drivers to work (Maybe the ASpeed GPU is interfering)
Ubuntu Mate, couldn't get nVidia drivers to work (Maybe the ASpeed GPU is interfering
OK, that took me 24 hours. FAILED. So browsing the Interweb had gave me some new ideas...
Standard Disclaimer: Your Mileage May Vary. I'm Not Responsible for ANY Damage (mental and/or physical).
Install Ubuntu, I'm using 15.04 Server. You should also update your kernel to v4.0.0. It will get rid of the "xHCI xhci_drop_endpoint called with disabled ep" errors when you are using USB passthrough.
Create a "vfio-group" file to map vfio group. In my case, my nVidia GTX 970 is in group 24, and my SR-IOV VF is group 28. run "./vfio-group 24" to create vfio group for your GPU
Obtain a copy of SeaBIOS. I'm putting it under /vm. OVMF is fine if you would like but SeaBIOS is fine with VFIO.
Start the VM; taskset is for CPU affinity. Adjust the parameters accordingly.
Because nVidia is a bitch. If you are running a virtual machine and want to use GPU passthrough in Windows, a nasty Code 43 Error will pop up. What you can do is pass "kvm=off" in the -cpu parameter (eg. -cpu host,kvm=off) and use an older driver. I have a GTX 970, so I have to use a "later" driver. I'm using 347.88 driver.
Since I'm using virtio-scsi driver, which is supposedly superior to virtio-blk. You need the latest virtio-win ISO for the driver, which can be obtained here.
I have a Dell USB Soundbar attached under my monitor. If you passthrough the soundbar to the VM and found that the sound is choppy, make sure that you change the frequency in Properties to 48000 Hz (DVD Quality). The default is 44100 Hz (CD Quality), which gives static when you play sound.
Bam, I got output on my monitor, and I can use my mouse and keyboard with USB passthrough.