GPU passthrough for lazy ppl on fedora 28 (using ansible)

I created an ansible playbook to setup gpu passthrough on a fedora 28 host. Hopefully someone will find it useful as it has saved me a great deal of time when I had to recreate my setup. Thanks to this community I am finally able to truly sandbox windows.

If anyone needs any help with this feel free to reply to this post.


If you anyone needs to know how to run the playbook let me know. Also Its currently setup to install on a remote host but it can also be run on a local host. I am kinda of new to ansible so please provide me feedback and or creative criticism.

Who’s awesome?

You’re awesome.

Seriously though. I’d love to see more of this stuff.


Thanks, When I get time I want to make one for an osx vm.


Should I add looking glass as part of this role :thinking: @wendell

1 Like

ansible plugin module thingie so users can comment/uncomment to their hearts’ desire

1 Like

also, not to threadjack, but shell script to check to see if you’re using message signaled interrupts or not?

I have a little script I’ve been working on thats just a shell script that checks 5-6 best practices. ansible based setup will work perfect with that. I am not sure how to script based check if you’re using message signaled interrupts or line interrupts. reliably. yet. just thought of it actually. gotta dig.


Like vars for packages to install that they can add or remove?? like

  • name : Install all packages
    name: {{ item }}
    state: present
    • random package
    • another package
    • another package
1 Like

sorry Im new to ansible was using this to hopefully have u guys give me feed back

I added this in last commit

So I created an account here specifically to say that you’re awesome! I just started looking into doing this today and you saved me a ton of work, thanks so much!


Maybe with some conditionals in ansible, you can even feed raw commands from ansible. If you wanna share the script I can maybe turn it into a playbook.

no ones giving me stars on github :slightly_frowning_face:

jk :grin::grin::grin:

1 Like

@SgtAwesomesauce and @wendell Should I do the osx setup as a whole role where it setups all the things, or just a playbook that can be run after my first role to create the osx vm ?

I want continue to build on this, if anyone has any ideas please share. I dont have an AMD card to test but if anyone has tried this with an AMD card and had issues let me know. I can add an alternate vm template that will remove the nvidia error 43 fix if its needed to improve proformance with amd card. Also if anyone has some additional ansible projects I can help with let me know cuz I’m trying to get as much practice with ansible as possible.

@monkdadon Just an idea, but you can add a way to attach a Windows install disc right from the script.

For example, provide a path to it in the variable file and have it attach as a DVD device to the VM up front. This would alleviate needing to install Windoze to the drive first and save some time for those looking to get into it.

As a small followup, you could also have a local file as an option rather than full disk passthrough. Not ideal, but might serve the same purpose of helping newbies get into it.

Edit: Forgot the mention

Almost done with the OSX play, I just need to convert my bash script to a XML and then make a jinga2 template for it. Performnce wise the OSX vm feels like its running on bare metal. @SgtAwesomesauce @wendell

1 Like

Hi there @monkdadon,

Great job this ansible playbook. I’m already working 2 weeks to get gpu passthrough working without success.

In your github project you write: “Before running this playbook install windows on its own physical drive”

So this part I quit do not understand. Should I install windows on a bare partition or should I install windows within the VM on a partition?

When I go to /etc/modprobe.d the vfio.conf file isn’t there. I have no idea why. I thought it was supposed to be there, the guide doesn’t say to move to a different directory.