Just sharing some info on what I did to get serial ports working in my Fedora Core 12 (fc12) host machine with Windows XP Guest:
Here is the short answer:
I used the following settings in Virtualbox (version 3.0.10_OSE) :
Port Number: COM1
IRQ: 4
I/O Port: 0x3F8
Port Mode: Host Device
Port/File Path: /dev/ttyS0
I also needed to add the user (my login) to the 'dialout' Group.
This info may be helpful for other users troubleshooting Virtualbox Serial Port problems (the long version).
Firstly you can check that Linux has loaded your serial port driver with the command:
Code:
# dmesg | grep ttyS0
You should see something like this returned:
serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
00:02: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
Next you can check who has permissions to access /dev/ttyS0 with the command:
You should see something like this returned:
crw-rw----. 1 root dialout 4, 64 2009-12-02 23:25 /dev/ttyS
We can see that 'root' and the group 'dialout' have permissions to access /dev/ttyS0
You will want to give the Virtualbox user (the user you login as) permissions to access /dev/ttyS0 so add the user to the 'dialout'group by:
a) Click, System --> Administration --> Users and Groups
b) Enter the root password
c) As an optional setep you disable 'Hide System Users and Groups' in the Preferences tab. Now you can see all system users and groups.
d) Double click the user and under the 'Groups' TAB tick 'dialout' (or what ever group your ls -l /dev/ttyS0' returns as having permission to access it)
e) Log-out and log back into Fedora.
If you don't have permission to access the dev/ttyS0 resource you will see the following error in Virtualbox:
Failed to start the virtual machine MACHINE_NAME_HERE
Cannot open host device /'dev/ttyS0' for read/write access. Check the permissions of that device. ('/bin/ls -l /dev/ttyS0'):......
As an additional note I could not use 'COM1' in the 'Port/File Path:' setting in virtualbox but /dev/ttyS0 works. The following error is produced with COM1 set:
Failed to start the virtual machine MACHINE_NAME_HERE
Failed to open the host device 'COM1' (VER_FILE_NOT_FOUND).
Unknown error creating VM (VERR_FILE_NOT_FOUND).
Following the above I also needed to add the serial port to Windows XP – my Guest OS:
Start –> Settings –> Control Panel –> Add Hardware
Next –> Yes I have already… –> (scroll to bottom) Add new hardware device –> Next –> Search and Install the Hardware.
You should now see the com port.
Hope this helps someone as it has helped me.