VMware ESXi and vSphere Cluster Management

Add a Virtual Serial Port in VMware Workstation Player

Learn how to add and configure a virtual COM port in VMware Workstation Player for physical serial hardware, host file logging, named pipes, and VM-to-VM communication.

A virtual serial port gives the guest operating system a COM-style serial interface. VMware Workstation Player can connect that interface to a real serial device on the host, a file, or a named pipe.

This is useful for legacy modems and printers, serial-controlled equipment, serial console logging, communication between virtual machines, and serial-aware applications running on the host.

How virtual serial ports work

The guest is the operating system running inside the virtual machine. The host is the physical computer and operating system running VMware Workstation Player. When you add a virtual serial port, Player presents a serial device to the guest. The guest may identify it as a COM port, such as COM1 or COM2.

The virtual port itself is not necessarily a physical connector. Player maps it to a destination selected during configuration:

  • A physical host serial port provides access to real serial hardware connected to the host.
  • Output to file records serial output in a file on the host.
  • A named pipe carries serial-style data between the VM and another VM or a host application.

A VMware Workstation Player virtual machine supports up to four virtual serial or COM ports. Each port must be mapped to an output or connection target. Adding a port without selecting a usable destination does not provide a working communication path.

Choose the destination before you begin

Destination typeWhat it connects toTypical use caseKey requirement
Physical host serial portA real serial interface or supported serial adapter on the hostUsing a modem, printer, controller, or other legacy serial hardwareThe host must recognize the port, and competing host software must release it
Host output fileA file on the host computerCapturing guest console or application output for later reviewThe destination path must be valid and writable by the host user
Named pipeAn operating-system interprocess communication endpointConnecting to another VM or a serial-capable host applicationBoth endpoints must use matching names, roles, and platform-appropriate settings

Prepare the virtual machine

  1. Identify the virtual machine that you want to change in the Player library.
  2. Shut down the guest operating system normally.
  3. Confirm that the VM is fully powered off, not running and not suspended.

Virtual hardware changes generally require the machine to be powered off. A suspended VM retains its execution state, so treat it differently from a powered-off VM. If the machine is suspended, resume it and shut down the guest, or use the available power-off action when an orderly shutdown is not possible.

Open the virtual machine hardware settings

  1. Select the powered-off VM in the Player library.
  2. Open the Player management options for that VM.
  3. Choose Virtual Machine Settings.
  4. Open the Hardware section or tab.
  5. Select Add to start the hardware-addition workflow.
  6. Choose Serial Port as the hardware category, then continue.

The exact menu wording can vary between Player releases, but the workflow is the same: select the VM, open its virtual machine settings, use the Hardware list, and add a Serial Port device.

Select a serial-port destination

The wizard asks what should receive or carry data from the new virtual serial port. Select the option that matches the purpose of the VM.

Option 1: Use a physical host serial port

Choose the physical-port option when guest software must communicate with real serial hardware attached to the host. Examples include a legacy modem, a serial printer, a console cable, or an industrial device.

  1. Choose the option for a physical serial port on the host.
  2. Select a specific host serial interface if Player lists one.
  3. Alternatively, choose Auto detect when you want Player to select an available host serial interface automatically.
  4. Decide whether to enable Connect at power on.
  5. Complete the wizard and save the VM settings.

Auto detect lets VMware Player choose the host serial interface rather than requiring you to identify one manually. Use a specific interface when the host has several ports or when a particular adapter must be used.

Connect at power on attaches the virtual serial device automatically whenever the VM starts. Enable it when the guest should have the hardware available for every session. Leave it disabled when the device must be attached only for selected sessions or when another host program sometimes needs exclusive access.

A physical port can normally be used by only one active consumer at a time. A terminal program, device-management utility, background service, or other VM may already have the port open. Close or stop competing software before starting the VM.

Option 2: Send serial output to a host file

Choose the file-backed option when you want to capture data produced by the guest rather than attach a live serial device. This is useful for boot messages, serial-console logs, diagnostics, and application output that should be retained for later inspection.

  1. Choose the option to output the serial port to a file.
  2. Provide a destination file path on the host.
  3. Select a directory that exists and is accessible to the host user running Player.
  4. Save the configuration and finish the wizard.

Use a location where the host can create or write the file. Avoid protected directories unless the Player process has the required permissions. Also make sure the guest application is actually sending data through the new COM port; a correctly configured file remains empty when no serial output is generated.

File output is primarily a capture mechanism. It does not represent a live serial connector for another application in the same way as a physical port or named pipe.

Option 3: Use a named pipe

A named pipe is an operating-system interprocess communication mechanism. In this configuration, it carries serial-style data between the guest and another endpoint instead of sending that data to a physical connector or a regular log file.

There are two common connection patterns:

  • VM-to-host application: The guest COM port connects through the named pipe to a serial-capable application running on the host.
  • VM-to-VM: One VM connects to a named-pipe endpoint and another VM uses the corresponding endpoint as its counterpart, allowing the guests to exchange serial data.
  1. Choose the named-pipe destination.
  2. Define the pipe endpoint using the format supported by the host operating system and its version.
  3. Set the connection role or related pipe options as required by the intended peer.
  4. Configure the host application or second VM with the matching endpoint details.
  5. Save the settings and finish the wizard.

Pipe naming conventions and connection-role details depend on the host operating system and its version. Do not assume that a pipe name written for one platform can be copied unchanged to another. The endpoint name, role, and connection mode must agree at both ends.

Finish the addition and verify the device

  1. Review the destination-specific settings in the wizard.
  2. Finish the hardware-addition workflow.
  3. Return to the VM Hardware list.
  4. Confirm that a Serial Port entry appears.
  5. Apply or save the virtual machine settings.
  6. Start the VM.
  7. Use the guest operating system's device list or serial-port configuration tools to confirm that the new COM port is detected.

The guest may assign a COM identifier based on its existing devices. Do not assume that the new port will always be COM1. Use the guest's device manager or equivalent hardware information to identify the assigned port, then configure the guest application to use that identifier.

Validate each destination type

  • Physical hardware: Confirm that the guest application can open the expected COM port and communicate with the attached device. Check that the hardware is connected to the selected host interface.
  • File output: Generate known serial output from the guest and confirm that the host file is created or updated.
  • Named pipe: Start and configure the peer VM or host application, exchange test data, and confirm that both endpoints receive it.

Configuration choices by use case

GoalRecommended destinationAdditional setting or consideration
Use real serial hardwarePhysical host serial portSelect the correct interface or use Auto detect; ensure no other host process owns the port
Capture outputHost output fileChoose a writable path and verify that the guest application sends data
Communicate with a host applicationNamed pipeConfigure the host application with the matching endpoint and platform-specific naming format
Connect two VMsNamed pipeGive both virtual serial ports compatible endpoint settings and start the peer endpoints

Practical examples

Connect legacy serial hardware

Suppose a host has a recognized serial adapter connected to a modem. Add a Serial Port device to the powered-off VM, select the physical host serial-port destination, choose the adapter or use Auto detect, and enable Connect at power on if the modem should be available every time the VM starts. After booting the guest, configure its modem or terminal software to use the COM port that the guest reports.

Capture a serial console

For a guest that emits diagnostic messages through a serial console, add a Serial Port device and select output to a file. Choose a writable host path, start the VM, and reproduce the event being investigated. Review the resulting file on the host. If it is empty, verify both the path permissions and the guest console configuration.

Connect a guest to a host tool

Use a named pipe when a serial-aware host application must exchange data with the guest. Configure the virtual serial port with the platform-appropriate pipe endpoint, then configure the host application with the same endpoint and compatible connection role. Start the application and the VM in the order required by the selected pipe mode.

Exchange data between two VMs

Create a named-pipe-backed serial port for each VM. Configure the two endpoints as a matching pair according to the host platform's pipe rules. Boot both guests, identify their assigned COM ports, and use serial software in each guest to send and receive a test message.

Troubleshooting

The Serial Port option cannot be added

Likely causes include a VM that is still running or suspended, or the wrong VM being selected.

  • Shut down the guest completely and confirm that Player reports the VM as powered off.
  • Do not use a suspended state as a substitute for powered off.
  • Verify the VM name in the Player library.
  • Reopen that VM's Virtual Machine Settings and try Hardware, Add, and Serial Port again.

The physical serial interface is missing

The host may not recognize the device or adapter, or another process may already be using it.

  • Confirm that the host operating system detects the serial interface.
  • Check that the adapter is connected and available to the host.
  • Close terminal programs, device tools, and other software that may have opened the port.
  • Try Auto detect when more than one valid interface is present.

The guest does not see the expected COM port

The device may not have been saved, the VM may have been started before the addition was completed, or the guest may need to rescan hardware or restart.

  • Confirm that Serial Port appears in the VM Hardware list.
  • Save the settings and restart the guest.
  • Inspect the guest device list to find the assigned COM identifier.
  • Check that the guest operating system and application support the serial device.

The output file is empty or cannot be created

  • Check that the destination is a valid host path.
  • Choose a directory where the host user has write permission.
  • Confirm that the guest application targets the newly added COM port.
  • Generate test output rather than checking the file before the guest sends any data.

Named-pipe communication fails

Most named-pipe failures come from mismatched endpoint settings or an unavailable peer.

  • Compare the pipe name and connection role at both ends.
  • Validate the naming syntax required by the host operating system and version.
  • Make sure the peer VM or host application is configured for the same endpoint.
  • Start the intended peer endpoint and confirm that it is listening or ready to connect.

Exam-relevant notes

  • A virtual serial port is a guest-visible COM-style interface, not necessarily a physical connector.
  • Workstation Player supports up to four virtual serial or COM ports per virtual machine.
  • The VM must be fully powered off before adding the device; running and suspended are different states.
  • The three destination categories are a physical host serial port, a host output file, and a named pipe.
  • Connect at power on controls whether a configured virtual serial device attaches automatically when the VM starts.
  • Named-pipe communication requires compatible endpoint settings and an available peer.
  • After adding the device, verify it in both the VM Hardware list and the guest operating system.