KVM (kernel virtual machine) vs. KVM (keyboard-video-mouse) switch

by crusaderky   Last Updated November 02, 2017 01:00 AM

I'm building a gaming setup with Ubuntu hypervisor, Windows 10 guest, and keyboard and mouse passed over with USB passthrough.

All the guides I've read recommend a KVM (keyboard-video-mouse) switch as one of the easiest options to move the keyboard+mouse between hypervisor and guest. However, the problem is that

  • every time I start the hypervisor, I find the keyboard consistently on the same USB ID, e.g.

Bus 001 Device 005: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver

  • However, if I unplug it and plug it back in into the same USB socket, as the KVM switch does, udev assigns to it a different ID, e.g.

Bus 001 Device 007: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver

which means that the keyboard won't be automatically reconnected to the guest anymore.

I need to find either

  • a way to force udev not to change the bus address when reconnecting the device, as long as I plug it back into the same port


  • some monitor script that automatically recognizes what's going on and changes the running VM on the fly to attach the device with the new ID

Related Questions

How to use Lantronix Spider KVM with latest Java 8

Updated September 08, 2017 17:00 PM

IHSE Draco Major KVM Switch Cascading

Updated September 21, 2015 22:00 PM

Avocent AutoView 3200 KVM - Password Reset

Updated September 26, 2017 09:00 AM

Factory reset for IBM KVM Console Switch 17353lx

Updated June 10, 2016 09:00 AM