Mini Blog‎ > ‎

Serial Console access in VirtualBox

posted Jan 18, 2011, 12:46 PM by Vick Khera
I tried today to use the VirtualBox trick I described earlier to configure up my pfSense firewall CF card before deploying it.  The only problem was that the embedded version boots to the serial port of the device, and the normal console is entirely unused other than to show the "BTX Loader" version number.

Digging around I found out how to make VirtualBox connect the serial port to the host, from where I could access it.

First, configure the serial connection in the virtual machine: enable serial ports, set COM1 to "use host-pipe", check the create pipe box, and in the path, name a file.  I used "/Users/vivek/serialconsole".  Since pfSense already uses the serial port as its console, there was no configuration necessary for the software.

When the virtual machine starts, this file name will be a socket to which you can connect and interact with the serial port of the machine.  On MacOS, the command to use is "nc -U /Users/vivek/serialconsole".  This seems to lose some random characters, but for the most part is quite usable to watch the boot process and interact with it as necessary to do the initial configuration required on the console.