Setting up windows gaming VM with dedicated graphics card passthrough using VFIO driver

I’m fairly familiar with how to do this on non immutable distributions, as I used to daily drive fedora workstation 36 all the way up to fedora 40. However I am at a bit of a loss as to how to handle setting it up on Bazzite. Is there a different process to modify grub to handoff the GPU to the vfio driver? I am trying to passthrough an Nvidia RTX 2080 super, while the bazzite OS will run on AMD 7900xtx.
20 Replies
Kyle Gospo
Kyle Gospo6mo ago
@HikariKnight
HikariKnight
HikariKnight6mo ago
exactly the same just different way to handle initramfs and grub, we automated most of it with ujust setup-virtualization, everything in there expects that you installed libvirt and virt-manager through this too. Enable virtualization --> enable vfio drivers (and follow instructions on how to bind your gpu to vfio-pci through grub using rpm-ostree) --> enable kvmfr module (if you are going to use looking-glass) then everything else you have to do in virt-manager as usual. process is slow as it will layer libvirt and virt-manager, then it has to rebuild initramfs on both the vfio step and kvmfr step. so if you think it is taking a long time, it is expected as rpm-ostree shows no progress bars. It just is not an advertised feature because we dont want to become "the vfio" system when it is something that is considered experimental and highly niche (and lets not mention the giant pile of unsupported configs) but we do recognize that some people (like me) like playing some games through a VM rather than dual boot.
Cm4nXD
Cm4nXDOP6mo ago
On fedora 40 I used a custom compiled version of qemu with patches to hide virtualization, how would I go about using that? I’m assuming I can’t just make install right? For context this is what I was using:
Cm4nXD
Cm4nXDOP6mo ago
GitHub
GitHub - zhaodice/qemu-anti-detection: A patch to hide qemu itself,...
A patch to hide qemu itself, bypass mhyprot,EAC,nProtect / VMProtect,VProtect, Themida, Enigma Protector,Safegine Shielden - zhaodice/qemu-anti-detection
HikariKnight
HikariKnight6mo ago
if its an rpm or in copr, you can just layer that and just replicate what we do in the Enable virtualization step you can get the source for the ujust with ujust --show setup-virtualization i would recommend looking into adding it to copr if you havent already, that way you can easily have it update and you can easily add it to an rpm-ostree based system in the future if you got any more questions i will answer them after work today
Cm4nXD
Cm4nXDOP6mo ago
Thanks
HikariKnight
HikariKnight6mo ago
heading to work in a bit and i got 7 hours of meetings 😵
Cm4nXD
Cm4nXDOP6mo ago
Oof 😅 that’s rough
HikariKnight
HikariKnight6mo ago
end of season work for me, planning for stuff after summer
Argon
Argon6mo ago
I am following along with this as well as the guide posted on the Bazzite site and I seem to have hit a snag after compiling. it opens in the terminal and I get two errors that say "Invalid value provided to the option: app:shmFile Error: Invalid path to the ivshmem file specified Valid values are: * /dev/kvmfr0 "
HikariKnight
HikariKnight6mo ago
you havent told it where to find kvmfr0 looking-glass-client --help also make sure you have enabled the kvmfr module through ujust setup-virtualization
Argon
Argon6mo ago
Thank you! I will have to play around with the first part of this. I do have kvmfr active already
HikariKnight
HikariKnight6mo ago
make sure /dev/kvmfr0 exists then. we have had someone who managed to get an invisible character into the modprobe config which then made the module not load
Argon
Argon6mo ago
I ran ls and I can see it in the list
HikariKnight
HikariKnight6mo ago
then try looking-glass-client -f /dev/kvmfr0
Argon
Argon6mo ago
Progress! It opened! Now saying that the host application is not running or the virtual machine is still starting up
HikariKnight
HikariKnight6mo ago
thats all thats needed add this to ~/.config/looking-glass/client.ini
[app]
shmFile=/dev/kvmfr0
[app]
shmFile=/dev/kvmfr0
that will make it so you do not need to do -f /dev/kvmfr0
Argon
Argon6mo ago
Looks like it's happy with that!
Cm4nXD
Cm4nXDOP6mo ago
for anyone else who has this issue:
Cm4nXD
Cm4nXDOP6mo ago
Want results from more Discord servers?
Add your server