How to access serial ubuntu host serial port on VirtualBox guest OS

I am having a difficult time trying to access a serial port on VirtualBox. My Guest OS is Windows XP and the host environment is Linux Ubuntu 10.04.

The serial modem device works perfectly in Ubuntu. I can communicate with it via cutecom or just sending plain echo messages to it like so:

echo "id" > /dev/ttyS2

Ubuntu Settings and config

I have added my user account to the following group: dialout and have set the serial using the following command: sudo setserial /dev/ttyS2 but still no luck when trying to access it in my Guest OS.

Heres the settings I use to configure the serial port in VirtualBox:

* Port Mode : Host Device
* Port Number : User - Defined (IRQ = 17, I/O Port = 0xEC00)
* Port/File Path : /dev/ttyS2

I have tried all the different port modes even disconnected but still no luck. I have consulted the manual aswell but nothing works. What could be wrong? Is it virtualbox or are my ubuntu settings configured incorrectly?

Please help

Thanks


Setting up a serial port for VirtualBox is not easy, mainly because of many options on how to transfer data from the host to the guest. For transferring data from/to an attached device (here a modem) the following settings should work:

alt text

Of course you will have to adopt setting for your device on the host (that would be /dev/ttyS2 in your case).

If using an IRQ greater than 15 for the host you will have to enable I/O APCI as shown here:

alt text

After a setup depicted in the example here your Windows guest will see a virtual type 16450 serial port on COM1 using IRQ4 and I/O Port 0x3F8. Data will be transferred from and to host device /dev/ttyS20.


If you are running a Windows host and a Linux Guest - you would use "COM#:" for the port/file path. Port Mode: Host Device.

If you are running a Linux host and a Windows Guest - you would use "/dev/ttyS#" for the port/file path. Port Mode: Host Device.

Where # is the number of the port.