IP KVM's are not cheap, at least if you want to buy new. FWIW, this makes me think it'd be perfect for a Raspberry Pi project.hmmmm. This is because, each time your Raspberry Pi boots (reboot), it will have a new IP Address assigned by the Router. This type of assigning IP Addresses is called Dynamic IP Address. Whenever we disconnect the Raspberry Pi from the network or turn down its power, the IP Address will change.
![Bmc Bmc](https://goughlui.com/wp-content/uploads/2014/03/DSC_9028.jpg)
A web-accessable IPMI / IP KVM system that provides full keyboard control, monitor view, and and the ability to reboot computers with standard motherboards remotely as if you were sitting in front of them with a keyboard and monitor.
Requirements
- Rasberry Pi 3 Model B (https://www.adafruit.com/product/3055)
- Rasberry Pi Zero 1.3 (https://www.adafruit.com/product/2885)
- 2.5Amp power (https://www.amazon.com/gp/product/B01FM0XOH8)
- GPIO pins for Pi Zero (https://www.adafruit.com/product/2822)
- GPIO cables (https://www.amazon.com/gp/product/B01BV2A54G)
- 2x MicroSD cards (https://www.amazon.com/dp/B06XWN9Q99)
- Relay board (https://www.amazon.com/dp/B0057OC5WK)
- Easycap UTV007 device (https://www.amazon.com/dp/B0126O0RDC)
- HDMI to S-Video (not all options work, but these two have been tested) (https://www.amazon.com/dp/B012MDMWLM or https://www.amazon.com/gp/product/B01E56CV42)
- USB TTL Serial cable (https://www.amazon.com/gp/product/B00QT7LQ88)
A full wishlist totaling under $120 at the time of this writing can be found at http://a.co/36FK9T8
Before assembling
On the Pi3, flash http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-09-08/. As of this writing you may use the latest Stretch version, however this was the version used successfully.
On the Pi0, flash http://downloads.raspberrypi.org/raspbian_lite/images/raspbian_lite-2017-03-03/. You must use this version for this to work. There aren't really security implications since the Pi0 can only be accessed from a serial session on the Pi3.
Before putting the SD into the Pi0, add this to the end of /boot/config.txt:
Before putting the SD into the Pi3, create a blank file called
SSH
on the boot drive to enable SSH.Also, if you will be connecting via Wifi, create a file in boot called
wpa_supplicant.conf
that uses unix based line feeds. To ensure that is the case, use Notepad++
or another editor that allows you to change line feed types (bottom right), or copy the config.txt
file and rename it. Include the following:Setting up the hardware
Here is a diagram of how you connect all of the pieces:
View the high resolution version
The detailed process is to:
- Connect the Pi3 to the relay board using this method: http://youtu.be/oaf_zQcrg7g
- Connect the Pi0 to the Pi3 using this method: https://www.thepolyglotdeveloper.com/2017/02/connect-raspberry-pi-pi-zero-usb-ttl-serial-cable/. You do not need to supply power to the Pi0, it will get power via the GPIO pins.
- Plug the easycap device and the USB TTL device into the USB ports on the Pi3
- Connect the HDMI out of your computer into the HDMI to S-Video box, and connect it to the EasyCap device via an S-Video cable
- Connect the Pi0 to the server via a microUSB to USB male cable
Quick Install
The quick method of installation is to simply run the install script on the Pi3 as the
pi
user:Everything will be done on the Pi3 and Pi0 automatically with the video input defaulting to s-video.
If you would like to manage multiple servers with one IPMI system, please see the Managing multiple servers section below.
Be sure to check the bottom of this README for Tips and Troubleshooting!
The long way
If you would like to do things step by step to understand how things work, the following instructions can be used.
Setting up the Pi 3
First, let's get all the software we need:
To test the ability to reboot the computer via the relay board, run:
Test this script to see if it resets the computer. If you are interested, look in the python script to see the numbers associated with which of the 8 relays you could use for multiple computers.
Next, set up the HTTP server.
Lastly, get everything running right by completing some tasks and updating
/etc/rc.local
to ensure they happen at boot:Setting up the Pi 0
Make sure you can access the Pi0 from the Pi3 by running:
Press enter until you see a login prompt. Do not login. Instead, exit the session by hitting
Control-A
then typing :quit
and pressing enter.On the Pi3, run:
Access the IPMI
You should now be able to access the IPMI console at
http://<RaspberryPi3IP>/
. From here you can set up SSL and port forwarding to the device as your situation requires.Managing multiple servers
Multiple servers can be managed by using multile USB capture devices (one per server), multiple USB-to-Serial adapters each with their own Pi0 (one per server), and using one of the 8 relays on the relay board as the reset button. Once installed, edit
/etc/ipmi.conf
. The format should be:- When hooking up multiple TV tuners and USB-to-Serial devices to Pi0s, it is recommended to use a powered USB hub.
- The
INP
field is1
for s-video or0
for composite. You can actually use one capture device for two servers by using both inputs. - The
PIN
value is the pin on the relay board. The valid values are2
,3
,4
,17
,27
,22
,10
,9
.
Tips
If you're using this on a Linux headless machine that's not running X11, it's easier to read the console if things are nice and big. Disabling the video driver is an easy way to accomplish this as it will just default to a generic NTSC or PAL signal. For instance, with an nVidia card, you could follow these directoins: https://askubuntu.com/questions/481414/install-nvidia-driver-instead-of-nouveau
To enable SSL, you need a combined PEM file which can be created by:
Then add this into the
/etc/lighttpd/lighttpd.conf
file (editing as required):Troubleshooting
If you're not getting video, here are some troubleshooting methods:
First make sure the
INP
field in /etc/ipmi.conf
is set to the right input. Input 0 is usually Composite, and Input 1 is usually S-Video.Connect a source and test to see if it's working.
Control-C that, and sftp the files to a host for viewing and playback:
You can test keyboard control from the Pi0 with commands like:
You will need to type things like 'a' and press ENTER to send the 'a.' Other ways to send keys include things like:
To reset the keyboard controller run this on the Pi3:
If you get wierd USB errors, make sure your power brick is strong enough and that you're not trying to power the HDMI to S-Video converter via the Pi3.
Posted by4 years ago
Archived
My cost for all the equipment (without bulk discount) is about $150. This includes relays that act as a PCU that can be toggled if a machine freezes up etc. It also includes temperature/humidity sensors for the server room. Oh also serial so you can keep the device plugged into your router in case you need to ssh remotely and web interface isn't working. I have the Pi wired, but also tethered to a Freedompop hotspot ($3.99/month for 500MB of data) in case the internet goes out and I need to diagnose remotely.
My question for you guys:
What should I do with this? I've spent countless hours getting this to work the way I want and I really don't want to just give it away, but I'm not really sure how to go about charging for them. Can I legally put the device together in a box and sell it to people? Would any of you honestly pay money for such a device?
The Lantronix spider which doesn't do near as much as I have this configured to do is going for around $250.
Any input is greatly appreciated!
Edit: Give me a week or two and I will reply to each person that said they're interested. I will put detailed instructions up on github or something similar.
Not sure when I'll get the chance to get everything together, but I also registered the domain pikvm.com so check that for updates. Please post 'interested' or something similar if you'd like me to send you a message to update you on progress.
Thanks!
Matt
43 comments