VMware Player online course

Add a Virtual Serial Port in VMware Player

Learn how to add and configure a VMware Player virtual serial port for a physical COM port, file capture, or named-pipe connection.

A virtual serial port gives the guest operating system a serial communications interface, commonly identified as a COM port. You can connect that interface to a physical serial port on the host, record its data in a file, or connect it through a named pipe to another application or virtual machine.

Typical uses include communicating with modems, legacy printers, and other serial devices; accessing a serial console; and capturing boot, diagnostic, or application output. The serial endpoint is configured in the VMware Player virtual machine hardware settings.

Before you begin

  • Fully power off the virtual machine. Do not change virtual hardware while it is running or suspended.
  • Confirm that you have permission to modify the virtual machine configuration.
  • Check that the guest operating system supports serial ports and that the guest application or driver is configured to use one.
  • Identify the intended destination: a host physical serial port, a host-side output file, or a named pipe.

A VMware Player virtual machine supports up to four virtual serial ports. If four are already configured, remove or repurpose an unused port before adding another.

Open the virtual machine hardware settings

  1. Select the target virtual machine in the VMware Player library.
  2. Open Player > Manage > Virtual Machine Settings.
  3. Select the Hardware tab.
  4. Click Add to begin adding a virtual device.
Player > Manage > Virtual Machine Settings > Hardware > Add > Serial Port

Add the serial-port device

  1. In the Add Hardware wizard, select Serial Port.
  2. Proceed through the wizard and choose the serial-port output destination.
  3. Configure the destination-specific options described below.
  4. Click Finish.
  5. Confirm that the new serial port appears in the virtual machine hardware list.

Choose a serial-port destination

The destination determines where data produced by the guest serial interface goes. Choose the option that matches the device or application you need to connect.

Destination optionWhere serial data goesBest use caseKey configuration considerations
Physical serial port on hostAn actual serial interface on the host computerLegacy devices, modems, printers, and serial consolesSelect the correct host port or use automatic detection; ensure no other application is using it
Output to fileA file stored on the hostBoot-message, diagnostic, and application-log captureChoose a writable path, provide sufficient disk space, and protect sensitive captured data
Output to named pipeA host application or another virtual machine through an operating-system communication endpointGuest-to-host software links and guest-to-guest serial connectionsUse compatible endpoint names, roles, startup order, and serial settings

Use a physical serial port on the host

Select the physical serial-port option when the guest must communicate with a real serial interface attached to the host. VMware Player forwards traffic between the guest's virtual COM port and the selected host port.

  1. Select the option to use a physical serial port on the host.
  2. Select the host serial port manually, or choose Auto detect where that option is available. Auto detect allows VMware Player to choose an available physical serial port.
  3. Decide whether to enable Connect at power on.

Connect at power on automatically attaches the configured endpoint when the virtual machine starts. Enable it when the serial device should be available immediately, such as for a serial console or a guest application that starts during boot. Leave it disabled when you need to attach the port only for occasional testing.

The host port must exist, be detected by the host operating system, and be available. Close terminal programs, device utilities, or other applications that may already have claimed the port. If automatic detection selects the wrong interface, select the physical port manually.

Example: connect to a legacy device

Add a serial port, choose the host physical serial-port option, select the correct host port, and enable Connect at power on if the device must be available as soon as the guest starts. The guest can then communicate through its virtual COM port with the device attached to the host interface.

Write serial output to a file

Select Output to file when you want serial data recorded in a host-side file rather than sent to physical hardware. This is useful for capturing guest boot messages, serial-console output, diagnostic information, or application logs.

  1. Choose the file-output destination in the serial-port wizard.
  2. Select an output-file location on the host.
  3. Enter or confirm the filename.
  4. Finish the wizard and later inspect the file while the guest sends serial data.

Choose a directory where the VMware Player process can write. Consider available disk space, especially if the guest produces continuous output. Restrict access to the file when it may contain credentials, diagnostic details, customer information, or other sensitive data. If no output appears, verify both the path and the guest application's selected COM port.

Example: capture diagnostic output

Add the serial device and select file output, then choose a writable host log-file location. Start the virtual machine and reproduce the event being investigated. The serial messages are retained in the host file for later review.

Use a named pipe

A named pipe is an operating-system communication mechanism that carries data between programs. In VMware Player, named-pipe output can create a direct serial-data connection between the guest and a host application or between two virtual machines.

There are two common relationship models:

  • Guest to host application: a serial program in the guest exchanges data with software running on the host.
  • Guest to guest: one virtual machine connects to another through compatible named-pipe endpoints, creating a virtual serial link.

Configure the named-pipe endpoint details in the wizard. Pipe names, endpoint roles, syntax, and naming conventions depend on the host operating system and the software at the other end. Both endpoints must agree on the pipe configuration and must be started or connected in the expected order. The guest and its peer must also use compatible serial communication parameters.

Example: connect two virtual machines

Configure a virtual serial port in each participating virtual machine and assign compatible named-pipe endpoints. Start the listener or peer endpoint in the required order, then start the guests. If the connection succeeds, the two guest serial applications can exchange data through the virtual serial link.

Complete and validate the configuration

  1. Click Finish to add the virtual serial port.
  2. Save the virtual machine hardware configuration.
  3. Start the virtual machine.
  4. Use the guest's device listing or hardware manager to verify that a COM or serial interface is present.
  5. Configure the guest application to use the assigned serial interface.
  6. Test communication with the selected destination: the physical device, output file, or named-pipe peer.

The guest must have appropriate serial-port support. A device appearing in the guest does not by itself guarantee communication; the guest application and the connected device or peer must use compatible settings.

Serial communication parameters

Serial communication parameters control how bytes are transmitted. When two connected endpoints use different values, communication may fail or appear as garbled text. Match the baud rate, data bits, parity, stop bits, and flow control in the guest application and the physical device, host application, or peer guest.

Configuration itemWhat to verifyWhy it matters
Virtual machine is powered offThe guest is fully shut down, not running or suspendedVirtual hardware changes may be unavailable or unsafe otherwise
Selected output destinationPhysical port, file, or named pipe matches the intended useDetermines where guest serial traffic is sent
Host port or output-file pathThe port exists and is free, or the path is writablePrevents unavailable-device and file-permission failures
Named-pipe endpoint compatibilityNames, roles, syntax, and connection order matchAllows the two endpoints to establish a connection
Connect at power on choiceAutomatic startup connection is enabled only when appropriateControls whether the endpoint is attached when the guest starts
Guest COM-port detectionThe guest lists the added serial interfaceConfirms that the virtual hardware is visible to the guest
Serial communication parametersBaud rate, data bits, parity, stop bits, and flow control matchPrevents failed or corrupted communication

Add multiple serial ports

To add another port, repeat the hardware-add process and select Serial Port again. Do not exceed the supported limit of four virtual serial ports.

Document the mapping between each guest COM port and its host endpoint. For example, record whether the guest's first serial interface connects to a physical device, a log file, or a named pipe. Give every port a distinct destination or a non-conflicting configuration so that traffic is not sent to the wrong endpoint.

Troubleshooting

The Add or edit option is unavailable

Fully power off the virtual machine rather than suspending it, then reopen Player > Manage > Virtual Machine Settings. Also confirm that the current user can write to the virtual machine configuration.

The guest does not see the expected COM port

  • Confirm that Serial Port appears in the VMware Player hardware list.
  • Start or restart the virtual machine after saving the hardware change.
  • Check the guest device listing and the serial application's selected COM interface.
  • Verify that the guest operating system has suitable serial-port support.

A physical port cannot be selected or communication fails

  • Verify that the host operating system detects an available physical serial interface.
  • Close host applications that may be using the port.
  • Select the correct port manually if Auto detect chooses incorrectly.
  • Match baud rate, data bits, parity, stop bits, and flow control on both sides.

No output appears in the log file

  • Confirm the configured output-file path and inspect the file while testing.
  • Use a host directory where VMware Player has write permission.
  • Verify that the guest application is sending data through the configured COM port.
  • Check free disk space and ensure that the file is not being blocked or protected by host security software.

Named-pipe communication does not connect or data is garbled

  • Check the pipe name and endpoint role on both sides.
  • Start the required listener, host application, or peer virtual machine in the intended order.
  • Use named-pipe syntax appropriate for the host operating system.
  • Align the serial communication parameters at both endpoints.

The virtual machine already has four serial ports

Review the existing serial-port devices. Remove or repurpose an unused port before adding another; four is the supported maximum.

Related VMware Player topics