Ramblings of an aging IT geek
← Ramblings of an aging IT geek
hardware

kvm over ip, built from a pi for the price of a takeaway

Building a working KVM-over-IP out of a Raspberry Pi and PiKVM so I could fix a headless box from the sofa without driving to it.

A soldering iron and electronics components on a workbench

The proper IP-KVMs cost more than the servers they manage, which has always struck me as backwards. I wanted to reach a headless box in another room as if I were sat in front of it: BIOS, boot menu, the lot, not just SSH once the OS deigns to come up. So I built one out of a Raspberry Pi and PiKVM, and it cost about as much as a curry.

The ingredients are a Pi 4, a cheap HDMI-to-CSI capture board so the Pi can see the target's video, and a USB OTG connection so it can pretend to be a keyboard and mouse. PiKVM is the image that ties it together. You flash it, plug the capture board into the target's HDMI out, run a USB cable from the Pi's OTG port into the target, and that is essentially it.

What you get is the whole machine in a browser tab. Live video of the target's screen, a keyboard and mouse the target believes are real USB devices, and crucially the ability to mount a disk image over the network so you can reinstall the operating system from your sofa. I have used it to get into the BIOS of a box that refused to POST, which is precisely the moment SSH is no help to anyone.

It is not flawless. The HDMI capture on the cheaper boards can be fussy about resolutions, and you do need to mind the USB power so the Pi does not brown out. But for fixing a machine that has fallen over in a way that lives below the operating system, having a real KVM that I built myself for the price of a takeaway has paid for itself several times over already.