[Testers needed] Introducing Vfio-conf, a gui to make pci passthrough faster and easier

I posted about this on reddit and they told me that you guys would be interested so here it is. I made this small gui tool to make the boring part of setting up pci passthrough faster and easier. The tool has been tested on arch, but I haven’t tested it on debian and haven’t even started implementing redhat support. The tool handles driver blacklisting, enabling/disabling of vfio and iommu and selection of the pci devices for vfio to grab on boot. The tool also has automatic detection of the distro you are using and support for kernels that have vfio compiled in.

I would greatly appreciate any help, especially with testing and redhat support.

Make sure you run the tool as root and with python 3.

The tool also shows iommu groups when iommu is enabled.

The github repo: https://github.com/JussiVJ/vfio-conf

Screenshot of the program: https://imgur.com/gallery/lnMUBja

8 Likes

Voi vittu, there’s so much cool stuff to try out and test rn and I’m sitting here with nothing but an old laptop, being left out from all the fun.
Looking for components NOW

I haven’t downloaded it yet, but does it propose changes before doing them (so the user can take notes and easily roll back)?

If not - i’d suggest that might be worth adding as a feature.

i.e., i click button X and it will then pop up a window outlining what changes it will make with a “confirm” or “cancel” option.

Does it back up the relevant configuration files first?

I’m curious to give it a go, but those two features are must-have IMHO.

I’d be willing to test on Fedora 29, but i haven’t had a properly working VFIO set up yet. And the last time i tried was on Ubuntu 1810 with Dual Vega cards. This time i ripped one out and have an RX480 in the second slot, but still dual AMD cards. So simply blacklisting AMDGPU probably won’t work for me … but i can help test that it does identify the correct files, etc. on Fedora if that would help.

1 Like

Just ran it as a non-root user and i can see it is attempting to do some file copies, etc. before prompting the user.

I’d suggest proposing changes and asking the user before attempting to commit anything - as you don’t know what files the user may already have on their machine (and you might clobber their changes), e.g. (output from not running it as root to see what it is trying to do to my box)

[jrose@ryzen2700x-allyour-net vfio-conf]$ python3 ./gui.py
cp: cannot create regular file ‘/etc/modprobe.d/vfioconf.conf’: Permission denied
Traceback (most recent call last):
File “./gui.py”, line 17, in
for line in fileinput.FileInput("/etc/modprobe.d/vfioconf.conf", inplace=1):
File “/usr/lib64/python3.7/fileinput.py”, line 252, in next
line = self._readline()
File “/usr/lib64/python3.7/fileinput.py”, line 339, in _readline
os.rename(self._filename, self._backupfilename)
FileNotFoundError: [Errno 2] No such file or directory: ‘/etc/modprobe.d/vfioconf.conf’ -> '/etc/modprobe.d/vfioconf.conf.bak

The files only have commented lines by default and aren’t copied if the filed exist.