Cookie
FlexiHub Team uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

Using Serial Ports in VMware: Definitive Guide

Last updated Apr 9, 2021

When it comes to using serial ports in VMware, the easiest way is to pass a VMware host’s serial port to the VM. This method works both for built-in COM ports and USB-to-serial adapters and can be a great option if you need to access a serial-based device (e.g. printing unit or bar-code scanner) from a VM.

From this article, you’ll find out how to make a serial port available in VMware with the help of a universal software solution that enables a VMware host’s serial port connection to a VM’s virtual COM port over the network.

Plus, you'll get acquainted with the VMware COM port passthrough setup process for each of the popular VMware solutions.

Connecting serial ports to VMware with FlexiHub

FlexiHub

Windows, macOS, Linux, Android
4.8 Rank based on 78+ users
One of the simplest and most convenient solutions to enabling VMware serial port passthrough is FlexiHub.
FlexiHub

FlexiHub is a software utility that lets you use serial ports and devices in VMware or any type of virtual environment.

FlexiHub works by establishing a virtual connection that redirects data from a physical serial port to a virtual COM port within the VMware session over the network. It’s so simple that no modifications of network parameters are required to add a VMware serial port.

How to add serial ports in VMware with FlexiHub

 flexihub account register
2
Download and install the application on the VMware host with a physically connected serial device. FlexiHub also needs to be installed on the VMware virtual machine that will connect to the COM port device.
 download flexihub
3
Start FlexiHub and log in to your account.
 log into flexihub
4
Launch the application on the VMware virtual machine and log in with your credentials.
 serial ports in vmware
5
Click ‘Connect’ next to the required serial device.
 passthrough usb to xenserver

Serial devices attached to the physical host will now be available in the virtual session. Without any additional configuration, you have enabled VMware COM port passthrough for your virtual machines.

How to make serial ports available in VMware - Video Guide

How to make serial ports available in VMware

Forward serial ports to VMware Workstation VMs


You can add up to 4 serial ports to a VMware Workstation. The virtual interfaces can be used to redirect data to physical serial ports, files or named pipes. When you add a serial port to a VMware Workstation session you can create modems and other serial devices that are available to the VM. The virtual port can also send debugging information to the host or another virtual machine.

How to add serial connection in VMware Workstation

  1. Shut down the virtual machine.
  2. Select the virtual machine and choose “VM->Settings”.
  3. Click “Add” on the "Hardware" tab.
  4. Select the "Add Hardware" wizard and choose "Serial Port”.
  5. Click on “Finish” to complete the process of adding a VMware Serial Port to the virtual machine.
  6. Choose the destination of the serial port output.
  • One option is to direct the output to the host system’s physical serial or parallel port.
  • Using a named pipe allows you to create a connection between a virtual session and a physical host or a different virtual session.
  • Any file on the host system can be used as an output file. Use an existing file or create a new one by typing its name in the directory.

In the case of the VMware Workstation serial port named pipe, it needs to be configured.

add serial ports vmware workstation

For Linux Hosts:

A UNIX socket name needs to be entered in the next text box. The name must be the same on the client and server and may look like /tmp/socket.

For Windows Hosts:

You can use the default pipe name or enter another name. The format of the pipe name must begin with \\.\pipe\. The name needs to be identical on the server and client.

To transmit debugging information to a virtual machine, choose “This End is the Server” on the initial drop-down menu and “The Other End is the Application” on the next drop-down menu.

Transmitting debugging data to a host system application, select “This End is the Server” on the first drop-down menu and “The Other End is the Application” on the second one.

Connecting the VMware Workstation to the serial port is done with the “Connect at Power On” option. When the VM is turned on, the connection will be activated.

The first VM usually takes the role of the server when two virtual machines are connected.

This process needs to be replicated for the second VM. When you are configuring the named pipe, define it as the client by selecting "This End is the Client.”

We hope that the information provided in this guide helps you redirect serial ports in VMware. Using these methods enables you to use serial devices from within virtual sessions with the full functionality afforded through a direct connection. They make your serial equipment more valuable as a much wider user base can share limited physical resources.

Redirect COM ports to VMware Workstation
30-day demo period

Adding serial ports to VMware ESXi

For vSphere virtual machines, there are four different ways of adding a serial port to VMware VM. it’s totally up to you to decide which one will be the best for your current task.

Before you start, don’t forget to shut down or power off the virtual machine and make sure you have these privileges: “Virtual Machine”, “Configuration”, and “Add or Remove Device”.

vmware esxi serial port passthrough

How to set up VMware ESXi serial port passthrough

  1. In the inventory, right-click a virtual machine and click “Edit Settings”.

  2. Go to the Virtual Hardware tab, click the “Add New Device” button, and pick Serial Port from the drop-down menu (it will appear at the bottom of the list).

  3. On the “New Serial port” menu, select one of these options:

    • Use output file: all data that an app running in the VM sends to the virtual serial port will be saved to an output file on the host computer. (Click “Browse” to select the file).
    • Use physical serial port: the VMware ESXi VM will use one of the host’s physical serial ports (a great option for external modems and hand-held devices).
    • Use named pipe: two virtual machines or a virtual machine and a process on the host will communicate directly (mostly used for remote VM debugging). You’ll need to name the pipe and select its Near end and Far end from the drop-down menus.
    • Use Network: virtual port will be connected over the network. You’ll need to select the network backing: Server for incoming connections, Client for outgoing ones, and enter Port URI. If you’re using a VMware virtual serial port concentrator, select the corresponding option and enter the vSPC URI location.
  4. Click “OK”.

With this method, you can enable VMware ESXi serial port connection for 32 serial ports per VM.

VMware ESXi COM port forwarding
30-day demo period

VMware Horizon (View) serial port redirection

To enable VMware serial port passthrough in VMware Horizon, you’ll need to install Horizon Agent with the Serial Port Redirection setup option (deselected by default). Once you set up the serial port redirection feature, it’ll automatically work on all your remote desktops and published applications (the redirected ports may be mapped to avoid conflicts).

vmware view serial port redirection

To enable serial port redirection in VMware View, you’ll need to make a redirected serial port active by right-clicking the port’s tool tray icon during a desktop session and picking “Connect“ from the menu. Alternatively, you can set a serial device to connect automatically whenever you connect to the remote desktop/published app.

VMware Horizon connect serial ports
30-day demo period

For the VMware View serial port redirection to work properly, your software/hardware has to meet these requirements:

  • Horizon Agent installed with the Serial Port Redirection setup option selected on the regular/RDS hosts.
  • Operating systems supported by the virtual desktops and published desktops: Windows Server 2016/2019, Windows 10 64-bit (additionally for virtual desktops).
  • Horizon Client for Windows: VMware serial port passthrough is supported by Windows 10 with any required serial port device drivers installed (serial port must be operable).

COM ports with VMware Fusion for macOS

vmware fusion add serial ports

In VMware Fusion, the serial port adding process won’t be very long or difficult.

Before you start, don’t forget to shut down or power off the virtual machine as its setting can’t be changed while it’s running or suspended.

How to add a virtual serial port on VMware Fusion

  1. Open the Window -> Virtual Machine Library option.
  2. Select a virtual machine and click “Settings”.
  3. Click “Add Device”, select “Serial Port”, and click “Add”.
  4. In the “Save as” field, choose the location for the virtual port’s output file, name it, and click “Save”.

FlexiHub

Requirements: Windows 7/8/10, Server 2008 R2/2012/2016/2019
Size: 8.82MB
Version: 5.1.13941 ()
User rating: (4.8 based on 78+ users)