Forward serial ports to VMware Workstation
You can add up to 4 serial connections to VMware Workstation. This allows you to share different serial devices and make them available to the VM. The virtual interfaces that are created can redirect data to the physical serial ports, files or a named pipe. This is especially useful for debugging, where the virtual port can send data to the host or to other connected VMs.
Here is how to add serial ports in VMware Workstation:
- Shut down the virtual machine
- Select the VM and choose ‘VM > Settings”
- Select “Add” from the “Hardware” tab
- Select “Add Hardware” wizard and choose “Serial Port”
- Click “Finish”
- Select the destination of the serial port output
- You can direct the output to the VMware host’s physical serial port.
- Create a connection between virtual sessions or between a virtual session and the host with a named pipe.
- Use any file on the host as an output file. You can create a new file or select an existing one by simply typing the name in the directory.
If you have opted for a named pipe output, you’ll need to adjust your configurations according to your operating system as follows:
Add a UNIX socket name in the text box. The name must be the same on the client and the server and should look like this: /tmp/socketname
You can enter a customized name or leave it as the default setting. The pipe name must be the same on both the client and the server, and it must follow the naming convention of \\.\pipe\.
When transmitting data between the server and the virtual machine, always configure the sender by selecting the “This End is the Server” option, and setting the receiver as “The Other End is the Application”.
If you want the VMware Workstation to connect to the serial port when the VM is turned on, select the “Connect at Power On” option.
Bear in mind when there are a number of virtual machines connected, the first VM will usually be the server.
Now to configure other VMs, simply repeat this process. If you are configuring the named pipe, you must define the client by selecting ‘This End is the Client”.
You’re now well on your way to redirecting serial ports in VMware. You can access different serial devices from any virtual session allowing you to have a wider, more valuable resource pool to share across your organization.