You are not logged in.

#1 2018-02-26 16:00:37

doctorzeus
Member
Registered: 2011-12-24
Posts: 79

QEMU PCI OVMF Passthrough USB Peripherals Switcher Script

Hello All!

So I switched over to Linux fully about a year ago as I found out about PCI passthrough (I like to game on my Windows VM).

I did however find that switching your keyboard and mouse between host and guest was a bit of an issue without installing (and purchasing) something like Synergy.

So I made a (very) simple bash script which utilizes netcat to listen for "ATTACH" or "DETACH" commands and reacts accordingly to attach/detach devices specified in the script. Thought i'd share it just in case anyone is having a similar issue:

https://github.com/doctorzeus1aonly/VMControlSwitcher

I run it as a daemon and firewall it using IP tables just in case. I then set KDE to send "ATTACH" to it via netcat on a specific key-press and "DETACH" on the windows guest VM with the same keycode which allows me to switch between them easily.

Thanks

Doctorzeus

Offline

#2 2021-03-15 07:19:12

LargeDSI
Member
Registered: 2019-09-24
Posts: 4

Re: QEMU PCI OVMF Passthrough USB Peripherals Switcher Script

This could be interesting for me, because I can't passtrough an USB controller to a VM.
Could you describe how you send "ATTACH" in KDE (and is there a DE agnostic way to do it?) and how did you setup Windows to send the "DETACH" command?

Any help would be much appreciated!

Offline

Board footer

Powered by FluxBB