GPU pass through guide for Ubuntu

Video is ready, Click Here to View ×

This video contains a comprehensive guide installing and running a Windows Virtual Machine with GPU pass through on Ubuntu 15.04/15.10 linux distro. Below are links and a follow along guide for the installation process. Thanks for checking this guide out and I hope this was useful video for you.

Also follow my girlfriend and the Derp Squad on Fractal Josh’s twitch channel, Follow my girlfriend on Twitter at,…


  1. This video is well done, but it is technically wrong. If this were indeed a pass-through, then both the operating system and the emulator would be using the video card cooperatively. This is the opposite of pass-through. Going headless makes this almost useless, because you might as well be doing a dual boot from Linux into a Hackintosh.

  2. Could you redo this tutorial for ubuntu server 16.04(16.04.2), please? I have fx 8300 octa core, some old amd gpu for host, because 8300 has no igp, and gtx 750ti. I would like ubuntu to be host and to host my website and Windows 10 in KVM for gaming. I just say that this turorial is kinda difficult to understand and is only for vms on ubuntu. Thanks!

  3. My one dream is to use the same GPU on both host and VM. 🙁 If a game has a linux version, I want to play the Linux version, but if it's Windows only, I don't want to mess with Wine and just use a Windows VM. I don't think this will ever happen though.

  4. Nice video. I have a question though. If I pass my main GPU (e.g. 970) to the VM (e.g. Windows 10), when I am not using the VM, in which GPU is the linux system going to run (in the 970 GPU or in the secondary e.g. the iGPU)?

  5. does it matter what slot the gpu is in? for example, could i use 01:00.0/1 for the gpu binding?

    on a different matter(not sure if directly related to the issue above), i launch my script, same script you have, only slightly modified to suit my pc obviously, and it freezes my pc for a few seconds, then after a minute, it comes back with a message in the terminal saying the command was killed? any idea why that happens?

  6. Hey, it's a really great and detailed tutorial. But I can't fix one issue. I do not get this message: "claimed by stub". I tried everything with no luck… Can you help me? 🙂 Thanks!

  7. You should not be running this as root. Add your user to the kvm and qemu group, make sure you create the bash script as a user NOT as root so that you don't need run anything as root.

  8. Hey! I've followed your steps, though my computer was unable to see the intel device, so i went to BIOS and switched it on.

    When i logged back in i got my ubuntu desktop with absolutely no UI elements beyond the cursor.

    Now, i've tried proceding with steps by using my phone and the terminal (CRTL+ALT+F1), but I seem quite unable to successfully blacklist the nVidia device, I've added it's ID to the PCI STUB but that doesn't seem to do a damn thing.

    Any idea on how to proceed?

  9. Hi. I tried running the bash script and all I got was
    #:/usr$ sudo ./vm1
    cat: '/sys/bus/pci/devices/10de:1086/vendor': No such file or directory
    cat: '/sys/bus/pci/devices/10de:1086/device': No such file or directory
    ./vm1: line 12: echo: write error: Invalid argument
    cat: '/sys/bus/pci/devices/10de:0e09/vendor': No such file or directory
    cat: '/sys/bus/pci/devices/10de:0e09/device': No such file or directory
    ./vm1: line 12: echo: write error: Invalid argument
    cat: '/sys/bus/pci/devices/8086:1c2d/vendor': No such file or directory
    cat: '/sys/bus/pci/devices/8086:1c2d/device': No such file or directory
    ./vm1: line 12: echo: write error: Invalid argument
    cat: '/sys/bus/pci/devices/8086:1c26/vendor': No such file or directory
    cat: '/sys/bus/pci/devices/8086:1c26/device': No such file or directory
    ./vm1: line 12: echo: write error: Invalid argument
    qemu-system-x86_64: cpu topology: sockets (1) * cores (2) * threads (1) < smp_cpus (4)

    Then nothing.

    I figured something isn't populating the vars with the vendor details, but I don't know any more than that. Here is my devices directory.

    /sys/bus/pci/devices$ ls
    0000:00:00.0 0000:00:1a.0 0000:00:1c.4 0000:00:1f.3 0000:03:00.0
    0000:00:01.0 0000:00:1b.0 0000:00:1d.0 0000:00:1f.5 0000:04:00.0
    0000:00:02.0 0000:00:1c.0 0000:00:1f.0 0000:01:00.0
    0000:00:16.0 0000:00:1c.2 0000:00:1f.2 0000:01:00.1

    Please help

  10. Just FYI your steps vs. the puget site are very different with regards to USB.
    Sadly, both you and them kind of haze over them without really giving any detail or explanation.
    For example, in your side by side comparison you state how your USB differs from theirs, theirs doesn't even have that line at all and neither of you show what it should look like with the address entered for the keyboard/mouse. I think I got theirs configured correctly but I have no idea what you were doing with yours as you never show the numbers replacing the variables or even why you changed that from what was on the puget site.

  11. So question #1: I've ran into so far. What if we want our VM to be located on a dedicated disk? For example I want mine on /dev/sdb1 which is a 480gb SSD, I would like the entire SSD dedicated to the VM. I've figured out how to do this with virt manager (took a minute) but not with command line.

    Question #2: Once created, can this VM be launched with virt manager?

  12. Very nice video. I found it humorous the number of times you called Puget Systems, Puget Sound. It became something to listen for, which kept me tuned in to what you were saying for everything else.

Leave a Reply

Your email address will not be published.