Skip to content

Virtual Machine »

Use Serial Ports on Virtual Machines

Quick guide to connect a serial device to a virtual machine using a physical or a virtual ports.

Last update: 2022-05-07

Serial Connection#

There are many cases that a guest machine need to communicate with an external device or host application through a Serial COM port. Since USB-to-COM devices can be connected to the guest machine directly, other real native COM devices must be connected to the host machine first.

Virtual machines have bridges which connect to serial port and forward data to guest machines. However, if virtual machine has connected to a port, host machine can not access it anymore. A virtual pair of ports will allow a host application to send data to a guest application as show in below diagram of connection methods.

Serial port connections

Bridge ports#

Virtual Machines have a setting screen for Serial Ports. It does not create a new COM port to connect to. It, actually, works as a bridge between a COM port on the host machine and a COM port on the guest machine.

Virtual Box serial settings

VMware serial settings

Windows provides legacy names only for COM ports #1 through to #9. For all other COM ports, the full device naming convention under Windows must be used. So starting from COM10, the field Path/Address has to be filled with \\.\COM10.

There are also some other modes:

  • Pipe
  • File
  • TCP

Virtual COM port#

A pair of virtual COM ports can be used to feed data to a COM port on a virtual machine. The Null-modem emulator is an open source kernel-mode virtual serial port driver for Windows, available freely under GPL license.

Download com0com emulator and run its setup to add pairs of COM ports, such as COM15-COM16. Then, you can connect to the COM15, to feed data to the COM1 of the virtual machine.

Some pairs of virtual COM ports

Virtual Serial Port Driver#

Paid product, with trial time

This software is far better than the null-modem Virtual COM port, because it adds many advanced features:

  • Splitting port (1-to-N)
  • Joining ports (N-to-1)
  • Port bundles (hub)
  • Port merging (bi-direction)

Virtual Serial Port Driver