r/VFIO • • Oct 06 '26

I was vibe coding for fun and ended up building a WHPX → KVM bridge

0 Upvotes

Hey everyone,

I was experimenting with AI coding agents and Linux for fun, and somehow ended up building a compatibility layer for running BlueStacks on Linux through Wine.

The basic idea is to provide the WHPX interface that BlueStacks expects and bridge it to Linux KVM.

BlueStacks → WHPX → Wine → WHPX/KVM bridge → /dev/kvm → KVM

I didn't really have a proper plan when I started. I was mostly experimenting, breaking things, reading errors, and fixing them until I eventually got it working.

I put the code on GitHub:

https://github.com/roninscript30/bluestacks-linux-kvm

It's still experimental, and I'm still learning a lot about KVM, Wine, and virtualization.

Sharing it here in case it's useful to anyone, or if anyone experienced with this area wants to take a look and give some feedback.


r/VFIO • • Apr 20 '26

News We had Nvidia selling Amd chips before GTA VI Spoiler

Post image
0 Upvotes

Obviously fake lol. This is how I did it:

<domain type="kvm" xmlns:qemu="http://libvirt.org/schemas/domain/qemu/1.0">

...

<devices>

...

<hostdev mode="subsystem" type="pci" managed="yes">

<source>

<address domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>

</source>

<rom bar="off" file="/usr/share/vgabios/275505.rom"/>

<alias name="ua-gpu0"/>

<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>

</hostdev>

<hostdev mode="subsystem" type="pci" managed="yes">

<source>

<address domain="0x0000" bus="0x03" slot="0x00" function="0x1"/>

</source>

<address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>

</hostdev>

...

</devices>

<qemu:override>

<qemu:device alias="ua-gpu0">

<qemu:frontend>

<qemu:property name="x-pci-vendor-id" type="unsigned" value="4098"/>

<qemu:property name="x-pci-device-id" type="unsigned" value="29772"/>

<qemu:property name="x-pci-sub-vendor-id" type="unsigned" value="4318"/>

<qemu:property name="x-pci-sub-device-id" type="unsigned" value="4318"/>

</qemu:frontend>

</qemu:device>

</qemu:override>


r/VFIO • • Oct 31 '21

Support PISS POOR GAMING PERFORMANCE ON RTX 3080 (DID A FULL FORMAT OF UNRAID, STILL)

3 Upvotes

​ For past 1yr, i am struggling to get stable frames in game. If i boot windows directly then it works flawlessly i get steady locked frame but when playing in Unraid, it goes for the toss.

In Windows bare metal

When i start the game i get 59 fps locked (i have locked fps at 59) and it works great and smooth,

In Windows - Unraid VM

It all goes for a toss, the game starts with 20-40fps range, flactuating a lot, then going upto 59fps but when i move the game it stutters like crazy, the average frame rate remains 60 only but my 1% Low & Framrate Minimum suffers like crazy and gives bad experience.

I was so fed up that i formatted the whole unraid usb and started afresh.

Followed this guide - https://mathiashueber.com/performance-tweaks-gaming-on-virtual-machines/

But it still sucks.

Screenshots of Guardians of the Galaxy (I have tested in multiple games over past yr, all same issue).

I just don't get it whats wrong. I have tried 16 thread setup, 14thread, 12threads and now i am at 8 threads. My GPU is clearly not being used fully and the fact that it works fine in bare metal is screwing with me so bad. Pleas help.

All i want is stable performance and working game.

I reset the framee counter before the first screenshot.

https://i.imgur.com/7PEJlkF.jpg https://i.imgur.com/0ViXRR8.jpg https://i.imgur.com/YDgKicN.png

<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm' id='2'>
  <name>Windows 10 - Gaming Optimized</name>
  <uuid>b6006252-1871-b460-d058-ff42f823ef65</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>20971520</memory>
  <currentMemory unit='KiB'>20971520</currentMemory>
  <memoryBacking>
    <hugepages/>
  </memoryBacking>
  <vcpu placement='static'>8</vcpu>
  <iothreads>2</iothreads>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='12'/>
    <vcpupin vcpu='2' cpuset='5'/>
    <vcpupin vcpu='3' cpuset='13'/>
    <vcpupin vcpu='4' cpuset='6'/>
    <vcpupin vcpu='5' cpuset='14'/>
    <vcpupin vcpu='6' cpuset='7'/>
    <vcpupin vcpu='7' cpuset='15'/>
    <emulatorpin cpuset='0-3'/>
    <iothreadpin iothread='1' cpuset='0-1'/>
    <iothreadpin iothread='2' cpuset='2-3'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-5.1'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/b6006252-1871-b460-d058-ff42f823ef65_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vpindex state='on'/>
      <synic state='on'/>
      <stimer state='on'/>
      <reset state='on'/>
      <vendor_id state='on' value='1234567890ab'/>
      <frequencies state='on'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough' check='none' migratable='on'>
    <topology sockets='1' dies='1' cores='4' threads='2'/>
    <cache mode='passthrough'/>
    <feature policy='require' name='topoext'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' present='no' tickpolicy='catchup'/>
    <timer name='pit' present='no' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <timer name='hypervclock' present='yes'/>
    <timer name='tsc' present='yes' mode='native'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/ata-Samsung_SSD_860_EVO_500GB_S4FNNF0NB21554M' index='2'/>
      <backingStore/>
      <target dev='hdc' bus='sata'/>
      <boot order='1'/>
      <alias name='sata0-0-2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='2'/>
    </disk>
    <disk type='block' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source dev='/dev/disk/by-id/ata-WDC_WD1002FAEX-00Z3A0_WD-WCATRC635557' index='1'/>
      <backingStore/>
      <target dev='hdd' bus='sata'/>
      <alias name='sata0-0-3'/>
      <address type='drive' controller='0' bus='0' target='0' unit='3'/>
    </disk>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='sata' index='0'>
      <alias name='sata0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </controller>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <alias name='usb'/>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <alias name='usb'/>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <alias name='usb'/>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x2'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:06:6b:3e'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio-net'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='52:54:00:22:8f:ec'/>
      <source bridge='br1'/>
      <target dev='vnet1'/>
      <model type='virtio-net'/>
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>
    <interface type='bridge'>
      <mac address='52:54:00:93:8d:da'/>
      <source bridge='virbr1'/>
      <target dev='vnet2'/>
      <model type='virtio-net'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
      </target>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-2-Windows 10 - Gaming /org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <input type='mouse' bus='ps2'>
      <alias name='input0'/>
    </input>
    <input type='keyboard' bus='ps2'>
      <alias name='input1'/>
    </input>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/mnt/disk1/NVIDIA.RTX3080.10240.210304.rom'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x0b' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x09' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0a' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x04' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev3'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0b' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x05' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0c' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x08' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev5'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0d' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x08' slot='0x00' function='0x3'/>
      </source>
      <alias name='hostdev6'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x0e' function='0x0'/>
    </hostdev>
    <memballoon model='none'/>
  </devices>
  <seclabel type='dynamic' model='dac' relabel='yes'>
    <label>+0:+100</label>
    <imagelabel>+0:+100</imagelabel>
  </seclabel>
</domain>


​

r/VFIO • • Jan 21 '26

Resource WARNING! Newer linux kernels break GPU passthrough ( error 43, etc)

0 Upvotes

I post this for anyone who may find it useful.
I post it also as a suggestion to be included in guides or somehow pinned.
Newer linux kernels ( seems 6.12 onwards ) break GPU passthrough for many.

I have found it the hard way, took me ONLY a week, and buying a new GPU.

Since the kernel was released about an year ago, topics discussing the matter are few and far between, this is not mentioned in most guides, etc. Seems that there are different workarounds for diff GPUs, also the symptoms are different. I think it is worth knowing, cos runing with 6.11 or older kernel at least for testing purposes might be the easiest option to see where the problem lies.
This happened for me on Ubuntu 24.04.4 and Win 10 guest, GeForce GTX 1650, intel CPU with integrated graphics

I will post the full setup, if you think that is helpful

PS I did not mean that it breaks it for everyone and every system. But the only reason to downgrade the kernel, was because I came across a few topics where already working passthrough was broken after working update, and downgrading fixed it.
The idea of the post was more - "one should try this as well" fix.


r/VFIO • • Jul 02 '22

rate my Virtual Machine (I downloaded the VM's HDD for this)

Post image
2 Upvotes

r/VFIO • • Nov 13 '21

Support Can someone explain y?

Thumbnail
self.hyperv
1 Upvotes

r/VFIO • • Aug 05 '23

Support why is this shit blank

Post image
2 Upvotes

r/VFIO • • Aug 11 '19

Support Looking Glass with VFIO passthrough garbage FPS and yes its 1080@60

1 Upvotes

So I'll start by saying I have a dedicated monitor connected to my passthrough VMs GPU which I've been using with no issues at all.

However I've decided to change up my workflow a bit and try looking glass by following the guide here: https://looking-glass.hostfission.com/quickstart

While I have the looking glass client running nicely on the host and able to see (but not yet interact with thats a problem for after this one is solved) the guest the UPS/FPS is trash. Keep in mind I'm just interacting with the Win10 desktop, not even running any real software. I opened a browser and loaded a youtube video and the framerate was trash. I get ~20/30 fps and its basically nothing but screen tearing/jittering/stuttering.

Obviously there's an issue here. While the FAQ says "if you're having UPS/FPS issues its totally ur own fault try ur game in windowed mode LOL" or "it only works well on 1080p LUL" these statements are completely useless. My screen is 1080 and I'm just watching a youtube video ffs. If looking glass cannot handle that then there's no way it'll handle a game.

Does anyone know what I can do to fix this issue? My passthrough GPU is a Geforce 1070GTX with WDDM 2.5.

Any help is appreciated.


r/VFIO • • Oct 21 '22

Discussion Hide a VM from being detected (running in a M1 mac)

1 Upvotes

Hello!

I need some help regarding the possibility of running a windows 10/11 virtual machine on my macbook air M1, and at the same time, being able to hide its virtual machine status in order to run games with anti-cheat.

I have tried many alternatives already. Parallels, VMWare, QEMU (UTM) and all of them fall on that problem. Doing some research I have come across some methods to do it such as adding -hypervisor parameters on QEMU configuration but it falls on the problem that my CPU's architecture (ARM) is not compatible with it at all. Also the windows version that i am running are ARM as well.

I just would like to know if there is any way to accomplish that? Thanks!


r/VFIO • • Mar 05 '20

A reminder that passthrough of NVIDIA GPUs requires patched VBIOS rom

4 Upvotes

I just spent a whole day trying to figure out why my GTX 980 would not display anything on passthrough. I tried virtually every UEFI-capable VBIOS rom from techpowerup and a lot of other things to no avail.

I didn't realise that the VBIOS rom needs to be patched/modified using the NVIDIA-vBIOS-VFIO-Patcher

My GTX 980 is now passing through perfectly with the patched VBIOS! What a relief.

I have spent > 100 hours of my life doing VFIO and I love it but damn it's frustrating...

Hardware list in case anyone else is curious or having issues:

Motherboard: Aorus Ultra Gaming X470 CPU: Ryzen 7 2700 GPU1: Asus Strix GTX 980 DCII OC (Host framebuffer is disabled so used for a linux guest) GPU2: Sapphire RX 580 8GB Nitro+ (Win10 guest) (no VBIOS patch required)

EDIT:

A few people are saying that patched VBIOS is not required in most cases. Here's a copy of my VM launch script for anyone who might have suggestions (I'm using qemu-system-x86_64 instead of libvirt):

#!/bin/bash
vfio-bind 0000:0a:00.0 || { echo "Failed to vfio bind GFX"; exit 1; }
vfio-bind 0000:0c:00.3 || { echo "Failed to vfio bind USB Controller"; exit 1; }
vfio-bind 0000:0d:00.3 || { echo "Failed to vfio bind Motherboard sound"; exit 1; }

qemu-system-x86_64 \
    -name guest=myhostname,debug-threads=on \
    -nodefaults \
    -enable-kvm \
    -M q35,kernel_irqchip=on \
    -cpu host,kvm=off,hv_time,hv_vendor_id=whatever,+topoext \
    -smp cpus=10,sockets=1,cores=5,threads=2 \
    -m size=32768 \
    -mem-path /var/lib/hugetlbfs/group/kvm/pagesize-1GB \
    -mem-prealloc \
    -vga none \
    -display none \
    -drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \
    -drive if=pflash,format=raw,file=/var/lib/libvirt/images/ovmf-rw/myhostname-OVMF_VARS.fd \
    -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
    -device vfio-pci,host=0a:00.0,bus=root.1,addr=00.0,multifunction=on,rombar=1,romfile=/var/lib/libvirt/images/rom/Asus.GTX980.4096.150122_patched.rom \
    -device vfio-pci,host=0c:00.3,bus=root.1,addr=00.1 \
    -device vfio-pci,host=0d:00.3,bus=root.1,addr=00.2 \
    \
    -drive file=/var/lib/libvirt/images/myhostname.raw,format=raw,id=disk3,if=none \
    -object iothread,id=myhostnameiothread3 \
    -device virtio-blk-pci,drive=disk3,iothread=myhostnameiothread3 \
    \
    -net bridge,br=br1 \
    -net nic,macaddr=0A-03-48-55-55-55,model=virtio \
    -usb \
    -pidfile /run/qemu-myhostname.pid \
    -monitor unix:/tmp/qemu-myhostname.sock,server,nowait \
    -daemonize \
;

As I mentioned in one of my replies, I did also try a bunch of other things including rombar=0 and CPU args hv_time,hv_vapic,hv_relaxed,hv_vapic,hv_spinlocks=0x1fff,-hypervisor.

EDIT2 Update: The issue was DVI - I was using this because my only spare cable was DVI.

  • DVI only with the patched BIOS.

  • Display Port works only with the unpatched BIOS.


r/VFIO • • May 03 '18

Would be awesome if this feature is added to virtual machine. I think it would dramatically improve performance of virtual machine greatly and allow playing game at near native performance without GPU Passthrough.

Thumbnail
reddit.com
0 Upvotes

r/VFIO • • Dec 27 '18

Why does one use virt-manager Virtual Machine Manager?

0 Upvotes

I don't get it. Maybe I'm too old. So many people use virt-manager (VMM or Virtual Machine Manager) to create a GPU passthrough VM, but I can't see the benefit.

virt-manager has next to no documentation. It significantly lacks behind the qemu/kvm development. It does a zillion of things in the background and messes up my carefully created network bridge, or creates more bridges I don't need.

Whatever settings I enter via the GUI, I still have to edit the bloody xml configuration. Worst of all, there is no modern editor to do that, but one is forced to use vi. We are in the 21st century and I feel like 30+ years ago sitting at a VT100 hacking Unix commands. Are we going backwards? EDITOR=xed virsh edit win10 does the trick - thanks @kuasha420 !

I can continue with undocumented features ("host=passthrough") and all the trial and error to get some decent performance out of it.

Please help and show me some benefits of the virt-manager GUI.

For reference, I'm on qemu 2.11 and virt-manager 1.5.1.


r/VFIO • • Oct 17 '22

Support After trying to run macOS Monterey on my Windows laptop, I got this screen and it has been stuck for 24 hours. Is there any solution?

Post image
2 Upvotes

r/VFIO • • Apr 22 '25

Discussion Help needed: Marvel Rivals still detects VM on Bazzite (Proxmox) even after hiding the hypervisor

1 Upvotes

Hi everyone,

I’m running two gaming VMs on Proxmox 8 with full GPU passthrough:

  • Windows 11 VM

  • Bazzite (Fedora/SteamOS‑based) VM

To bypass anti‑VM checks I added this to the Windows VM and Bazzite VM:

args: -cpu 'host,-hypervisor,+kvm_pv_unhalt,+kvm_pv_eoi, hv_spinlocks=0x1fff,hv_vapic,hv_time,hv_reset,hv_vpindex, hv_runtime,hv_relaxed,kvm=off,hv_vendor_id=amd'

Results so far

Fall Guys launches on both VMs once the hypervisor bit is hidden, but Marvel Rivals still refuses to start on Bazzite.

What I’ve already tried on the Bazzite VM

  1. Using the same CPU flags as Windows – guest won’t boot if -hypervisor is present, so I removed it.

  2. Removed as many VirtIO devices as possible (still using VirtIO‑SCSI for the system disk).

  3. Use real world smbios.

  4. Updated Bazzite & Proton GE to the latest versions.

No luck so far.

  • Has anyone actually managed to run Marvel Rivals inside a KVM VM on Linux?


r/VFIO • • Jul 10 '22

Should I install Windows 8 to this Virtual HDD?

Post image
1 Upvotes

r/VFIO • • Jun 29 '18

Discussion How VFIO improved my gaming

1 Upvotes

Since a new video game was coming out, but Linux version wasn't coming until much later, and it wouldn't play in Wine, I've decided to use Windows to play it. That of course meant using VM GPU passthrough. My setup was good for that to start with - ASRock 99FX board and AMD FX CPU - so I didn't had to basically buy another computer to do it. However, along the way, I've encountered what seemed like every single possible problem.

VM dropped me into UEFI console

I've had this problem making me just scratch my head for a while. I was trying to follow the advice to use SCSI hard disk driver, and as it said, I would also mount the Virtio drivers disk - and then the UEFI would fail to pick up a boot drive. The solution was to simply install it like normal and do the fancy hardware tricks later.

VGA driver loaded before VFIO

I'm running Ubuntu and it has kernel modules load automatically, and more often than not you will not be able to change the order in which they're loaded through conventional means. The solution was to use soft dependency, I've created a "radeon.conf" file and put "softdep radeon pre: vfio-pci" into it.

Having anything other than literally "host-passthrough" as CPU model sometimes caused "CPU feature missing"

Yes I know that all the walkthroughs say to use that specifically, but I figured since the libvirt GUI had the "pass host model" checkbox, that would be fine. Looking up the error suggested to use one of QEMU virtual CPU models, that solved the problem but then it came back again, when I finally got to edit the XML file over virsh I'd see that it uses "host-model" as the CPU, setting that to "host-passthrough" fixed the problems.

Adding command line devices caused PCI slot collisions

I've only added Samba file sharing NIC through command line so only it caused problems: you need to pass a network adapter together with the SMB user network, because latter is outside of the normally created network adapters' pool and they cannot see it. A device added over command line automatically uses up a PCI slot, but then some other device tries to use the same slot. I've never found a good solution, but you can manually edit your VM XML settings file and change the PCI slot of the offending device to something else. Changing anything about the device in GUI will immediately undo it.

Sharing input via linux-input cases Permission Denied errors

There could be two reasons and they could be both causing problems, simultaneously. The first is simply the fact that kvm process doesn't have permission to access these /dev/input files. I edited the qemu.conf file and aded myself as a user and "kvm" as group, and added myself to the "input" group, and added these devices into the list. It still didn't work, turns out you need to re-login before these changes take effect. It still didn't work; I've checked input device permissions and turns out everything in /by-id/ and /by-path/ is owned by root, so I had to resolve the symlinks and put the /dev/input/eventXYZ in there instead. That still didn't work, because AppArmor was stopping libvirtd from accessing these; after setting it into "complain" mode it finally started working.

Audio stuttering and crackling

That was a super common problem as per my research, but it turns out that the root of the problem is that the buffer size is not sufficiently large for the low frequency it's being read at. Simply increasing the buffer size does the job. I'm using PulseAudio so I was still stuck with gigantic input lag, so I thought of buying a soundcard to bypass it. I could have used a custom build but for the time being I've decided against it.

The linux-input devices are not infallible

So I decided to play some games and few minutes in, the mouse stopped responding. It worked just fine on the host and I could switch back and forth with no problem, just by pressing both control keys. The mouse was stuck and required a complete VM reset to get it working again. It became clear that I'd had to buy another set of inputs to pass through, because having middleware sitting in between, increasing latency and reducing reliability for no good reason, didn't stuck me as a good idea.

Conclusion

At that point it was basically a second computer, parasiting on my main computer. So I just bit the bullet and bought an low end PC, plugged into it my host GPU and host hard drive, and now that's my Linux machine. The original machine, now lacking HDD but having an SSD in place, is now a Windows gaming machine.

This is a fascinating technology and a significant milestone in emulation, but as far as gaming goes, it's just impractical. I can live with small audio problems and with 5 FPS drop, but not with huge random stutter every so often, and not with the Linux machine is left in semi-usable state while VM is running, not to mention possible security problems. It's much more practical to just buy a second computer. It will only be a small fraction of the price of the gaming machine, and both computers are untainted by each other's presence.


r/VFIO • • Apr 24 '21

Support Is there a way to make VMWare think I'm using a mac so I can enable 3d acceleration and make the vm run much faster?

0 Upvotes

Since Apple doesn't like people to use a MacOS virtual machines outside the mac hardware enviroment, I want to know if I can sort of hack vmware so I can simulate my PC is a Mac so it works fine.


r/VFIO • • Feb 01 '21

I can't make the screen FHD

0 Upvotes

why can't I make the screen full HD although I did put this <vendor_id state='on' value='randomid'/> and this <kvm> <hidden state=’on’/> </kvm>


r/VFIO • • May 08 '20

How could Riot Games achieve something that even NVidia couldn't - VANGUARD Anti-Cheat blocking Windows 10 VM

0 Upvotes

Hello friends,

I've finally made my upgraded my old rig into a Hypervisor Qemu machine with dedicated GPU and VM for gaming on W10. It cost me some troubles, especially the Nvidia driver. So Nvidia, the greedy company as it is, is trying to detect whether or not one is using a virtual machine before installing their precious, proprietary driver. After some trouble shooting I was able to install it and show my middle finger to team gree(n/d).

After the initial setup I went straight on to downloading and installing my favourite and sadly sometimes Chinese software (discord) and quickly found out that Riot Games' new Anti-Cheat program Vanguard wouldn't actually install in a VM.

This left me thinking about one thing: If Nvidia's putting some effort to stop people installing their driver on virtual machines to charge them thousands of dollars for a stupid VM Driver (it's not even their business how I use their Hardware wtf?), then how can Riot hold us even more from installing their stupid game?

Can it be that VANGUARD's looking deeper into the Kernel even during its installation? Shouldn't the program be able to recognise the system that it's running on AFTER gaining access to kernel ring 0?

Cheers


r/VFIO • • Jul 26 '21

SomeOrdinaryGamer's tutorial help

0 Upvotes

having some trouble with a video SomeOrdinaryGamer put out about using Microsoft's virtualization to allow KVMs to bypass all the Virtual Machine bans that anti cheats come with, like BattlEye and Riot Vanguard. The video mentions adding 6 lines, and although I've added them, the virtual machine doesn't want to start. Before I added them everything was working fine, so I know for a fact that they had an effect. I press the "start virtual machine button" and the system just reboots into the linux login screen. Ideally what's supposed to happen is it boots into windows 10, and I'm more or less able to play games like Valorant or R6 without trouble. Or atleast, that's what I expected to happen. If it helps at all, I'm running Linux Mint 20.1 Cinnamon 64-bit.

I'm not sure if it'll help or not, so here's the link to the video I used to set up my KVM: https://www.youtube.com/watch?v=eTX10QlFJ6c

Link to SOG's video: https://www.youtube.com/watch?v=L1JCCdo1bG4

my XML for reference:

<domain type="kvm">
  <name>win10</name>
  <uuid>8ba41668-c126-40e2-a3c5-121cc1689ff5</uuid>
  <metadata>
    <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
      <libosinfo:os id="http://microsoft.com/win/10"/>
    </libosinfo:libosinfo>
  </metadata>
  <memory unit="KiB">20506624</memory>
  <currentMemory unit="KiB">20506624</currentMemory>
  <vcpu placement="static" current="6">72</vcpu>
  <os>
    <type arch="x86_64" machine="pc-q35-4.2">hvm</type>
    <loader readonly="yes" type="pflash">/usr/share/OVMF/OVMF_CODE.fd</loader>
    <nvram>/var/lib/libvirt/qemu/nvram/win10_VARS.fd</nvram>
    <bootmenu enable="yes"/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state="on"/>
      <vapic state="on"/>
      <spinlocks state="on" retries="8191"/>
      <vpindex state="on"/>
      <runtime state="on"/>
      <synic state="on"/>
      <stimer state="on"/>
      <reset state="on"/>
      <frequencies state="on"/>
    </hyperv>
    <kvm>
      <hidden state="on"/>
    </kvm>
    <vmport state="off"/>
  </features>
  <cpu mode="host-model" check="partial">
    <topology sockets="1" cores="6" threads="12"/>
  </cpu>
  <clock offset="localtime">
    <timer name="rtc" tickpolicy="catchup"/>
    <timer name="pit" tickpolicy="delay"/>
    <timer name="hpet" present="no"/>
    <timer name="hypervclock" present="yes"/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>destroy</on_crash>
  <pm>
    <suspend-to-mem enabled="no"/>
    <suspend-to-disk enabled="no"/>
  </pm>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type="file" device="disk">
      <driver name="qemu" type="qcow2"/>
      <source file="/var/lib/libvirt/images/win10.qcow2"/>
      <target dev="sda" bus="sata"/>
      <boot order="1"/>
      <address type="drive" controller="0" bus="0" target="0" unit="0"/>
    </disk>
    <disk type="file" device="cdrom">
      <driver name="qemu" type="raw"/>
      <source file="/home/eric/Desktop/VM shit/virtio-win-0.1.185.iso"/>
      <target dev="sdb" bus="sata"/>
      <readonly/>
      <address type="drive" controller="0" bus="0" target="0" unit="1"/>
    </disk>
    <controller type="usb" index="0" model="qemu-xhci" ports="15">
      <address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
    </controller>
    <controller type="sata" index="0">
      <address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
    </controller>
    <controller type="pci" index="0" model="pcie-root"/>
    <controller type="pci" index="1" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="1" port="0x10"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="2" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="2" port="0x11"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
    </controller>
    <controller type="pci" index="3" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="3" port="0x12"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
    </controller>
    <controller type="pci" index="4" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="4" port="0x13"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
    </controller>
    <controller type="pci" index="5" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="5" port="0x14"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
    </controller>
    <controller type="pci" index="6" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="6" port="0x8"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0" multifunction="on"/>
    </controller>
    <controller type="pci" index="7" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="7" port="0x9"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x1"/>
    </controller>
    <controller type="pci" index="8" model="pcie-to-pci-bridge">
      <model name="pcie-pci-bridge"/>
      <address type="pci" domain="0x0000" bus="0x07" slot="0x00" function="0x0"/>
    </controller>
    <controller type="pci" index="9" model="pcie-root-port">
      <model name="pcie-root-port"/>
      <target chassis="9" port="0xa"/>
      <address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x2"/>
    </controller>
    <controller type="virtio-serial" index="0">
      <address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
    </controller>
    <interface type="network">
      <mac address="52:54:00:25:2b:4e"/>
      <source network="default"/>
      <model type="virtio"/>
      <address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
    </interface>
    <input type="mouse" bus="ps2"/>
    <input type="keyboard" bus="ps2"/>
    <sound model="ac97">
      <address type="pci" domain="0x0000" bus="0x08" slot="0x02" function="0x0"/>
    </sound>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0a" slot="0x00" function="0x0"/>
      </source>
      <rom file="/usr/share/vgabios/AMD.RadeonVII.16384.190211.rom"/>
      <address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0a" slot="0x00" function="0x1"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x06" slot="0x00" function="0x0"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x0c45"/>
        <product id="0x7603"/>
      </source>
      <address type="usb" bus="0" port="1"/>
    </hostdev>
    <hostdev mode="subsystem" type="usb" managed="yes">
      <source>
        <vendor id="0x093a"/>
        <product id="0x2530"/>
      </source>
      <address type="usb" bus="0" port="4"/>
    </hostdev>
    <hostdev mode="subsystem" type="pci" managed="yes">
      <source>
        <address domain="0x0000" bus="0x0c" slot="0x00" function="0x3"/>
      </source>
      <address type="pci" domain="0x0000" bus="0x09" slot="0x00" function="0x0"/>
    </hostdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="2"/>
    </redirdev>
    <redirdev bus="usb" type="spicevmc">
      <address type="usb" bus="0" port="3"/>
    </redirdev>
    <memballoon model="virtio">
      <address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
    </memballoon>
    <shmem name="looking-glass">
      <model type="ivshmem-plain"/>
      <size unit="M">32</size>
      <address type="pci" domain="0x0000" bus="0x08" slot="0x01" function="0x0"/>
    </shmem>
  </devices>
</domain>

r/VFIO • • Jan 19 '24

Support Using a VM to play video games

0 Upvotes

Hi r/VFIO

I am a league of legends player trying to safely play league of legends without potentially compromising my whole system. Their new anti cheat requires you to give kernel level access to the anti cheat, which I do not trust, so I am looking into virtualization as an option.

I just need 3 things really, first I need to get good performance, I need to be able to not have to reinstall the game on the VM every time (being able to save the progress, reason I can't use windows sandbox) and last I need my pc to not be exposed to rito games on a kernel level. Can anyone give me advice or a how to? I've looked into hyper-v but it seems to me GPU passthrough creates a security flaw.
Thanks for your time!


r/VFIO • • Nov 17 '18

RDP though Linux; Play games on windows 10 which has GPU

0 Upvotes

Hello.

Here is my setup:

Ubuntu 16.04 where I do all things- Decent hardware, No GPU but I like to play games

I have a Windows 10 desktop with 4 gpu's (YES, I am still mining crypto in 2018; I am an enthusiast) in the basement to which I RDP using Remmina RDP client from ubuntu; This machine has a decent hardware; good asus motherboard; M2 Nvme ssd, 4gig ram but not a good CPU(celeron); I'm planning to use one of the gpu to play games on this windows machine by RDP-ing from ubuntu machine. Is the GPU pass though possible in this scenario?

Drawbacks known: network latency. Windows machine is wired but the ubuntu is not.

Willing to upgrade RAM and CPU if this setup works. Thanks for inputs


r/VFIO • • Dec 05 '25

Hi everybody. If I want to go into cloud computing as a newbie. What would be the first certifications you’d advice me to do

0 Upvotes

r/VFIO • • Sep 23 '20

Rumour: SR-IOV support on some consumer navi2 cards?

Thumbnail
wccftech.com
9 Upvotes