Configuring a virtual serial port

This is for discussing general topics about how to use VirtualBox.
Post Reply
Bazaroff
Posts: 5
Joined: 6. Apr 2014, 07:30

Configuring a virtual serial port

Post 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.
Last edited by mpack on 6. Apr 2014, 14:50, edited 2 times in total.
Reason: Gave the topic an informative title.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Hello! I am from Russia.

Post 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.
Bazaroff
Posts: 5
Joined: 6. Apr 2014, 07:30

Re: Configuring a virtual serial port

Post 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}
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Configuring a virtual serial port

Post 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.
Post Reply