Page 1 of 1

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

PostPosted: 16. Jan 2010, 10:08
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.

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

PostPosted: 16. Jan 2010, 23:22
by mhoggard
Thank you for the instructions. They worked perfectly for adding COM1 to my Windows XP guest.

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

PostPosted: 22. Jan 2010, 05:10
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.

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

PostPosted: 26. Jan 2010, 22:05
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.

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

PostPosted: 26. Jan 2010, 23:24
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

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

PostPosted: 19. May 2011, 22:19
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!

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

PostPosted: 29. Jun 2011, 10:05
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!

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

PostPosted: 30. Jun 2011, 13:19
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.

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

PostPosted: 4. Jul 2011, 10:40
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.

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

PostPosted: 13. Jul 2012, 18:27
by Bob801
Regarding your response about creation of a serial port, how do you get into Guest Settings on Windows 7? :(

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

PostPosted: 19. Sep 2014, 19:02
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.

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

PostPosted: 20. Jan 2016, 07:41
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)

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

PostPosted: 20. Jan 2016, 16:10
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...

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

PostPosted: 21. Jan 2016, 04:33
by Nathrelor
Oh...that might explain part of the reason y I was so confused and couldn't get it to work...

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

PostPosted: 26. Mar 2019, 00:37
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.