Page 1 of 1

Configuring a virtual serial port

Posted: 6. Apr 2014, 13:40
by Bazaroff
Hello! I am from Russia.
Sorry for the poor knowledge of English.
I use Oracle VM VirtualBox. Host - Windows XP.
I want to connect COM1 host with the virtual machine.
For this purpose in the virtual machine configuration I enabled serial port, chose the port number - COM1 and the port mode - host device, but I do not know what I should write in the box "port \ file path".I could not find a detailed description of it.
I tried to write in this box the following:
\\.\com1.
Perhaps it is wrong, because the virtual machine does not start and reports an error:

Failed to open a session for the virtual machine MSDOS.

Unresolved (unknown) file i/o error. (VERR_FILE_IO_ERROR).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

Please, help me to solve this problem.

[mod note] Please give topic titles useful names - "Hello! I am from Russia" doesn't really give much indication of the subject to be discussed. I've edited your post to correct this.

Re: Hello! I am from Russia.

Posted: 6. Apr 2014, 14:45
by mpack
A virtual comm port has two names.

The first name (the "Port Number" field) is how the guest will see it, i.e. this says what port we're going to simulate inside the guest. This is nearly always COM1 because there's no reason to simulate anything else. Actually this identifier is just a convenience, because what's actually being configured is the base address and IRQ fields to the right - which you should leave well alone.

The second name (the "Port/File Path") is the name the host gives to the port. In your case that would be "COM1:", but it could be any other host serial port identifier, and it could also name a named pipe.

Re: Configuring a virtual serial port

Posted: 6. Apr 2014, 16:36
by Bazaroff
Thank you very much mpack for your support!
I tride to write
COM1:
But I got the same error message again:

Failed to open a session for the virtual machine MSDOS.

Unresolved (unknown) file i/o error. (VERR_FILE_IO_ERROR).

Result Code: E_FAIL (0x80004005)
Component: Console
Interface: IConsole {8ab7c520-2442-4b66-8d74-4ff1e195d2b6}

Re: Configuring a virtual serial port

Posted: 6. Apr 2014, 17:07
by mpack
Moved to "Windows Hosts" since the discussion is not generic.

If it's giving you an I/O error then the file/device does not exist, or there is some other problem with accessing it. Are you sure the serial port is "COM1:" on your host? Typically, only the first native port is accessed as COM1. USB-RS232 adapters are assigned higher numbers.

You might also get an I/O error if the host port is already being used by some other application.

And just in case this is an issue: it is not possible for a guest application to communicate with a host application by configuring them to use the same serial port. It may be possible to use a named pipe however.