You can set up the virtual serial port in a virtual machine to use a physical serial port on the host computer. You can also create an output file for the serial port or a named pipe.