Archive for the ‘virtual machine’ Category

forwarding a ps2 keyboard to qemu

January 24, 2020

Here’s my situation. I’m running Arch Linux as my main os. I have Windows running in a virtual machine with hardware virtualization. The benefit are near native performance, being able to use your computer during big Windows updates (which is heaven). A small downside is, I have to have 2 keyboard and mice attached. Forwarding a USB-device is peanuts using virt-manager, forwarding a ps2-device is a bit harder. Apparently not a lot of people do it, so it wasn’t too easy to find out how to do it.

First you would need to find where it’s located. I’ve done this quite some ago, so I don’t remember how I did that, but here’s what you need to add once you have the address:


  <input type='passthrough' bus='virtio'>
    <source evdev='/dev/input/by-path/platform-i8042-serio-0-event-kbd'/>
    <address type='pci' domain='0x0000' bus='0x00' 
slot='0x09' function='0x0'/>
  </input>