Adding Serial Port support to Virtualbox

This post was originally posted on phunkymunkys.com on 22/09/2011  link to original post

Having got hold of a Cisco router I had to try to connect to it via my Windows XP virtual machine installed in VirtualBox. The problem I had was the COM port was not recognised in the VirtualBox settings, every time I tried to start the Windows VM it failed with an error.  One of these errors suggested checking the permissions and user groups to make sure these were correct.
Turns out I needed to add my (host) user to the correct group.

Use the command

1
ls -l /dev/ttyS*

to list the current groups for tty’s.
Output of tty configuration

As can be seen here the serial ports are all in the dialout group so using the user manager I added myself to the dialout group. Once that was done ( remember to logout and back in once you change group associations!! ) I set up the serial port in the virtualbox settings COM1, choose the Host Device option and add /dev/ttyS0 as the path.

Serial port configuration VirtualBox

Once this was done I started the Windows XP virtual machine and it now booted fine and once logged in Windows detected the new hardware and installed it automatically.

Now I am able to console into the router and all is good.