VMware Horizon By Product Technical Guides

Serial Port Redirection for Virtual Desktops in Horizon 6

By Peter Brown, Director of R&D, VMware, London, UK

In December 2014, we gave a sneak peak of the serial port redirection feature in View virtual desktops which we have been working on. We are delighted to announce that we have officially made this function available with our June 2015 Horizon 6 release.

The new serial port redirection feature allows serial ports, either physical COM ports or USB-to-serial adapters, to be redirected from a Windows client machine to a Windows VDI desktop. The ports can then be used by third-party applications to communicate with legacy serial devices such as printers or scanners.

This feature works only in PCoIP sessions (RDP supports serial redirection natively anyway); RDSH is not supported.

In order to use this feature you must have both of the following:

  • Windows Horizon Client 3.4 or later
  • View Agent 6.1.1 or later

During installation of the agent component, the Serial Port (and Scanner) Redirection options are made available. Note that they are both deselected by default, so if you want to use them, you must specifically enable them. USB redirection is also deselected by default (see this blog post on USB redirection in View virtual desktops for an overview of why); USB redirection is not required, and should not be used, to redirect scanner or serial devices. Using USB redirection for these devices would bypass the scanner and serial redirection capabilities. It is possible to co-install scanner and serial redirection with USB redirection, but make sure that the scanner and serial devices are not forwarded to the guest using the USB redirection option.

VMware_View_Agent_Installer_Options
Figure 1: View Agent Installer Options

After installation of the View Agent on the virtual machine in the data center, the serial port redirection icon appears in the tool tray when the user connects to the View virtual desktop with a compatible Horizon Client.

Serial_Redirection_Tool_Tray_Icon
Figure 2: Tool Tray Icon for Serial Port Redirection

From the tool tray, the user must right-click the serial port redirection icon to configure COM port mappings and properties.

Tool_Tray_Pop_Up_UI
Figure 3: Tool Tray Pop-Up User Interface

COM ports can be configured to be auto-redirected. With auto-redirection enabled, the next time the user connects to the agent, the COM ports will connect without requiring manual intervention.

In Figure 3, the text COM1 mapped to COM3 indicates that the physical COM1 port from the virtual desktop is being mapped into a virtual COM port on the guest VM under the name COM3.

Device_Manager_COM_Port_Redirection
Figure 4: Device Manager Showing COM Port Redirected into Guest

After a COM port has been mapped to the guest VM, a third-party application in the virtual desktop can access the COM port and open it, send and receive data, and close it just like it could on a physical machine.

In addition to the UI allowing port properties to be configured, there is also a Group Policy file that allows the configuration to be managed via group policy on a per user or per desktop pool basis. The GPO file is available in the Horizon 6 View GPO Bundle download, along with all of the other group policy files shown in Figure 5.

GPO_Configuration_Serial_Port_Redirection
Figure 5: GPO Configuration of Serial COM Redirection

One important configuration item that might affect some of you is the configuration option Serial2USBModeChangeEnabled. This option must be set if you are connecting to a USB-to-serial adapter that contains the Prolific chipset. We found during testing that if this key is not set, the virtual COM port received, but did not transmit, data. Setting this configuration option puts the COM port in a different mode and allows it to work with these specific devices.

Remember when using serial port devices that the baud rate and other settings for serial communication must match exactly between the device and the third-party application. For example, if a device operates at 9600 bps, 8 stop bits, 1 data bits, and even parity, then the third-party application software needs to be configured to operate at these exact values, too. There is no configuration required in the VMware serial port redirection software for this.

As a reminder, for this feature to work, you must have both of the following newly released components:

  • Windows Horizon Client 3.4 or later
  • View Agent for Windows 6.1.1 or later

And be sure to confirm that the serial port redirection feature is selected during View Agent installation.

This feature is for Windows only. In some cases, serial port device drivers must be installed on the client system to enable the redirection capability (this is more common when using USB-to-serial adapters). You can find additional information on serial port redirection in the following documentation:

We look forward to hearing how you get on with the feature, and welcome feedback on some of the devices that get redirected using this capability!