Problem with the serial port

Discussions related to using VirtualBox on Linux hosts.
Locked
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Problem with the serial port

Post by hanymedic »

Hello,every body

i installed virtualbox 2.2 on ubuntu 9.04 and installed win xp as a guest OS

i wanted to use serial port in the win xp,so i made the configuration in the virtualbox setting as follow :
Enable serial port
port number :com1 irq:4 i/o port:0x3f8
port mode :host device
port path :/dev/ttyS0

and when i save the configurations and try to access xp the virtualbox get crashed
with that error:
Failed to start the virtual machine windows XP.
Failed to open host device '/dev/ttyS0' (VERR_DEV_IO_ERROR).
Unknown error creating VM (VERR_DEV_IO_ERROR).

and in detail tab:
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
Console
Interface:
IConsole {9511bc54-15ee-4ddf-808e-472aba03809c}


plz try to find me asolution ASAP


thx in advance
Good Luck !!!
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: aproplem with the serial port

Post by Perryg »

Do you actually have something plugged in the serial port? If Ubuntu can not see anything it will not load it and none of the guests will be able to use it either.

Try on the host
cat /var/log/dmesg |grep tty
see if ttyS0 shows up.
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Problem with the serial port

Post by baf »

Also show the output of:

Code: Select all

ls -l /dev/ttyS0
id
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Re: Problem with the serial port

Post by hanymedic »

thx all but i still have the same problem

when i "cat /var/log/dmesg |grep tty"
it was the O/P
[ 0.004000] console [tty0] enabled
[ 1.621128] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 1.621562] 00:08: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A


when i type "ls -l /dev/ttyS0"
the O/p is
crw-rw---- 1 root dialout 4, 64 2009-04-30 10:58 /dev/ttyS0l

the o/p of "id" is
,125(vboxusers),5000(virtual),5001(tty)
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Problem with the serial port

Post by baf »

Code: Select all

when i type "ls -l /dev/ttyS0"
the O/p is
crw-rw---- 1 root dialout 4, 64 2009-04-30 10:58 /dev/ttyS0l

the o/p of "id" is
,125(vboxusers),5000(virtual),5001(tty)
Well to use that serialport your user must be a member of "dialout" because only root and that group may use it.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Re: Problem with the serial port

Post by hanymedic »

i still have the same problem
i tested it and when i write
"grep dialout /etc/group"
the o/p is:
dialout:x:20:hany,root

where hany is my own user which i run Virtualbox from it
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Re: Problem with the serial port

Post by hanymedic »

also when i access system-> administration-> Users and Groups

i didn't find the dialout Group :(
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Problem with the serial port

Post by baf »

Have you logged in and out since you added yourself to dialout ?
If that doesn't help reboot.
id must show it before it works.
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Re: Problem with the serial port

Post by hanymedic »

i reboot but still have the same problem :(
baf
Volunteer
Posts: 829
Joined: 27. Sep 2008, 06:18
Primary OS: Mac OS X Leopard
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: linux,xp,win7
Location: Luleå or Skellefteå, Sweden

Re: Problem with the serial port

Post by baf »

Does

Code: Select all

id
show you as a member of dialout?
Some say: "You learn as long as you live".
My way: "You live as long as you learn".
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Re: Problem with the serial port

Post by hanymedic »

o/p of "id" is:
uid=1000(hany) gid=1000(hany) groups=4(adm),20(dialout),24(cdrom),26(tape),29(audio),46(plugdev),108(lpadmin),114(netdev),123(admin),124(sambashare),125(vboxusers),1000(hany),5000(virtual),5001(tty)

o/p of "grep dialout /etc/group" is:
dialout:x:20:hany,root
hanymedic
Posts: 7
Joined: 30. Apr 2009, 10:21
Primary OS: Ubuntu other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: win xp,netbsd

Re: Problem with the serial port

Post by hanymedic »

plz any body has a solution for this ????
zkfarmer
Posts: 1
Joined: 27. May 2009, 10:02
Primary OS: Ubuntu other
VBox Version: OSE Debian
Guest OSses: XP

Re: Problem with the serial port

Post by zkfarmer »

I have a same problem, finally, reinstall virtualbox solve the problem,my os is ubuntu9.04
cuevas1208
Posts: 1
Joined: 30. Nov 2016, 17:21

Re: Problem with the serial port

Post by cuevas1208 »

Make sure you are not using(connected) to the port with your host OS.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Problem with the serial port

Post by mpack »

Hmm. Thanks for the contribution, however... after being dead for 7 years it's probably best to let this topic RIP. Locking it.
Locked