As one is able to easily forward the USB HID signals from the keyboard to the virtual machine I'd be surprised if this wasn't possible.

Do I need a "KVM" (Kernel-based Virtual Machine) for this to work?

I'm running Debian 9.1 with KDE and I can sniff the USB HID traffic via wireshark and the /sys/kernel/debug/usb/usbmon/name file. Afaik that filestream needs to be forwarded from my machine to the virtual machine.

How can this be done?


First, the native keyboard support in VirtualBox (and any other VM manager) is not forwarding USB HID signals from your keyboard, it's interpreting scancodes provided by the OS and generating the emulated scancodes in the VM (and it's probably a PS/2 keyboard in the VM, not USB). The same applies to the mouse, and any other input device.

Second, section 3.10 of the VirtualBox manual (which is the first place you should be looking for stuff like this) very clearly explains how to attach USB devices to a virtual machine.


The solution was:

  • Installing VirtualBox 5.0.2 instead of the latest version Installing latest VirtualBox
  • Installing the "VirtualBox Extension Pack-5.0.2" as described here Installing the appropriate "VirtualBox Extension Pack". (I had a problem with VBoxSvc consuming 100% of my CPU when installing the latest version and having tried to install the Extension Pack for it. It worked later after it asked me about installing the latest Extension Pack within the program as it found the old one for reasons that are unclear and somewhat dubious to me.)
  • Rebooting
  • Creating the virtual machine
  • Going to its Settings->USB->checking "Enable USB Controller", checking the "USB 2.0 (EHCI) Controller radiobutton, clicking the + button on the right, selecting the USB HID device, checking the added USB device

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.