How to: Add a Serial Port in Windows XP and 7 Guest.

Discussions about using Windows guests in VirtualBox.
jorgensen
Posts: 581
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, LinuxMint

How to: Add a Serial Port in Windows XP and 7 Guest.

Post by jorgensen »

Because the description in the help and manual is very poor and others have had similar problems, I decided to write this guide after lots of trials.

Original it was posted in the Windows Hosts section for XP guest, but has now added Windows 7 settings.

How to add a physical serial port.
In Guest Settings for Serial Ports set as follow
Port1: Checked
Port Number: COM1
Port Mode: Host Device
Windows Host:
Port/File Path: COM1:
Note the colon in COM1: (not semicolon). I have experienced the guest could become unstable without it.
For a host port number higher than 9, the naming \\.\comX where X is the port number, is required. This can also be used for a one digit port number.
Linux Host:
Port/File Path: /dev/ttyS1
For other COM port than 1 replace the digit with port number.

Also remember the IRQ and I/O Port settings.
If the guest needs to see another port than COM1, change the Port Number to the requested port.
If using a user defined IRQ for the guest, IO APIC may have to be enabled.

Save the settings and start the guest.

Open the Device Manager in the guest and go to the Ports (COM & LPT) section.
If you see a COM3 port with a yellow warning icon skip the following sections.

XP:
Open Add Hardware from the Control Panel.
After searching for hardware select ‘Yes, I have already connected the hardware’ and Next.
Go to the bottom and select ‘Add a new hardware device’
Select ‘Install the hardware that I manually select from a list’
Select ‘Ports (COM & LPT)’
Select ‘Communication Port’ from Standard port types.
Continue with Next until finished.
WIN7:
From the Action menu select Add legacy hardware.
Select Next, ‘Install the hardware that I manually select from a list’ and Next
Select ‘Ports (COM & LPT)’ and Next
Select ‘Communication Port’ from Standard port types.
Continue with Next and Finish.

In the Device Manager you should now see the COM3 port with a yellow warning icon.

Open Properties for the COM3 port.
Select Advanced from Port Settings.
Choose COM1 from the ‘COM Port Number’ (Ignore possible 'In Use')
In the Resources tab select ‘Set Configuration Manually’ if you see it.
In Windows 7 uncheck ‘Use automatic settings’
Select the configuration that corresponds to the VirtualBox settings as noted – likely configuration 0000.
Close the box and you should be asked to reboot.
After reboot the COM1 port should now be working.

How to add an USB serial port.
Important: Depending on version 'VirtualBox Extension Pack' must be installed to use an USB serial adapter.

You have the choice of installing the device USB driver on the host or cancel this installation, but the VirtualBox's host routing must be installed when the device is accessed for the first time in the guest.

In guest Settings for USB set as follow
Enable USB Controller: Checked
Enable USB 2.0: Checked
Add the driver (e.g. FTDI USB <-> Serial)

Save the settings and start the guest.

From the menu or status bar of VirtualBox frame check the Serial Port in the USB section.
Install the USB driver in the guest - I have found it is a good idea to restart the guest after the host routing is done and before the driver installation. If still a problem with the USB initializing the following procedure usually will do the job link.

In the guest the port number can be changed in the Device Manager, as well as settings for buffers, timers, etc.
Last edited by jorgensen on 22. Jun 2013, 17:31, edited 9 times in total.
mhoggard
Posts: 1
Joined: 16. Jan 2010, 23:18
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: WinXP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by mhoggard »

Thank you for the instructions. They worked perfectly for adding COM1 to my Windows XP guest.
sjjoseph
Posts: 3
Joined: 18. Jan 2010, 09:29
Primary OS: MS Windows 7
VBox Version: OSE Mandriva
Guest OSses: XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by sjjoseph »

Hello jorgensen,
Thanks for sharing the information on the forum.
I have successfully added to windows 7.
Now I will try for windows Xp.
Thanks.
npbetxi
Posts: 1
Joined: 26. Jan 2010, 21:59
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Windows XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by npbetxi »

Hi jorgensen,

Do you know if there is possible to add more than two serial ports to a virtual machine?

I am new to virtualbox and know nothing about the inner workings of it.

Many thanks for the information.
jorgensen
Posts: 581
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, LinuxMint

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by jorgensen »

VirtualBox only supports 2 physical serial ports - if you have them on the host.
Otherwise you can have numerous serial ports with USB serial devices or what is called 'Serial Device Servers' which has many suppliers see link
Last edited by jorgensen on 8. Jan 2013, 23:43, edited 1 time in total.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by scottgus1 »

Thank you VERY much, Jorgensen!! I followed your HowTo and successfully got the serial port on our SBS2003 VM's host to talk to the other XP VM we're running. No we can reprogram our serial-connect phone system! Your tutorial was flawless. This should definitely be made a sticky somewhere!
SLt
Posts: 2
Joined: 29. Jun 2011, 09:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by SLt »

Hello everyone.
First of all thank you Jorgensen for the detailed explanation.
I am trying to set up a license server on a virtual Windows XP. The server needs to access a dongle, located at the COM port.
I was first trying to set it up using Microsoft's Virtual PC together with XP mode. There, I had no problem to access the COM1 from the virtual machine, but it does not support any port forwarding in NAT mode.

With virtualbox I can configure port forwarding, but I did not succeed in configuring the COM port. When I have a look at the device manager in the virtual machine, COM1 shows up as OK, but when I start the server configuration, it does not find the dongle located at COM1.
Even after following jorgensens How To, I get no success.

I am using VirtualBox Version 4.0.8r71778 and have attached the output of showvminfo just in case it helps for diagnosis.

Any help, hint or advice is appreciated. Many thanks in advance!
Attachments
showvminfo.txt
(6.33 KiB) Downloaded 1537 times
jorgensen
Posts: 581
Joined: 20. Oct 2009, 01:22
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, LinuxMint

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by jorgensen »

My guess is the license Server is accessing the serial port hardware directly in a way VirtualBox doesn't support.
I would therefore take contact to the provider of the Server software and ask them about running the application in virtual programs.
SLt
Posts: 2
Joined: 29. Jun 2011, 09:46
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Windows XP

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by SLt »

Hello Jorgensen,

thank you for that quick answer! Unfortunately, asking the manufacturer is probably not an option, since the software I am trying to get to run is extremely old and the company is not existing any more.
I will probably have to stick to Microsoft's Virtual PC and sort out my network problems differently.
Bob801
Posts: 1
Joined: 13. Jul 2012, 18:22

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by Bob801 »

Regarding your response about creation of a serial port, how do you get into Guest Settings on Windows 7? :(
swimteam
Posts: 1
Joined: 19. Sep 2014, 18:56

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by swimteam »

Superb instructions.

A question.
The goal is to talk to both laptops using a Tera Term terminal on each. Simple pass characters
back and forth. That's it.

I have two HP laptops: Windows XP and Windows 7.
I have a USB cabe connecting the two. NOT a so-called "transfer" cable. Just plain USB.

I run Tera Term. Tera Term finds a COM port for Windows XP. One cana type characters.
It does NOT find a COM port for Windows 7.
Does this mean that Windows XP has a USB to serial port driver but Windows 7 does not?

Where can I get a USB serial driver for Windows 7 so that Tera Term will find a COM
port?

Thanks.
Nathrelor
Posts: 4
Joined: 20. Jan 2016, 07:22

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by Nathrelor »

I have a Macbook pro running El Capitan. I have windows 10 on my Virtualbox. the problem comes in when I want to use a usb port from windows. i've tried everything i could think of and spent hours looking over forums on this site but i can't figure out how to make it work! I want to be able to connect to the usb port from the windows VM rather than switch to windows partition so I can use the windows VM for controlling my 3D printer and my Mac for everything else.
I normally never do anything on a forum site but i'm getting a bit desperate here, someone please help me :(

pretend i have no idea what anything is and i need step by step instructions, if u want to throw in some pictures too that would be great, i just really want to get this working so i don't have to switch to the windows partition every time i want to print something and then have to do without the mac side of my computer for the many hours it takes some things to print :(

(I JUST submitted this exact post under a new forum/thread/thing on the site so if that would be easier then just respond there)
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by scottgus1 »

Nathrelor, cross-posting isn't allowed and this post is in a thread about serial ports, not USB ports. This one's likely to wither on the vine...
Nathrelor
Posts: 4
Joined: 20. Jan 2016, 07:22

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by Nathrelor »

Oh...that might explain part of the reason y I was so confused and couldn't get it to work...
Bear96708
Posts: 5
Joined: 16. Mar 2019, 19:32

Re: How to: Add a Serial Port in Windows XP and 7 Guest.

Post by Bear96708 »

I have the check mark under VM Framework under USB for the FTDI<-> Serial (0400) Checked.

I still get a question mark under device manager, other devices USB <-> Serial.

The device is plugged into Com 1, the W7 has the correct configuration for Com 1.

I have the Intel serial driver/USB setup on the XP desktop. I downloaded it in W7, then, moved it with the Shared Folders in the Frame drop down from the W7 folder where it was stored. I have other serial driver install programs moved to my XP desktop, they don't work either when executed.

I opened it and installed, rebooted, and it still doesn't install the serial driver successfully.

I also did the add hardware instruction, it states hardware installed.

Thanks for your assistance, in advance.
Attachments
xp32 Clone-2019-03-25-12-27-26.log
(122.66 KiB) Downloaded 421 times
Post Reply