I have just virtualized a physical machine running Windows XP Pro SP3. The physical machine it was copied from is running a piece of critical software needed for day-day operation and security.
This software communicates with a separate device through an DB-9 RS232 serial port (COM1).
I need the newly created VM to be able to communicate with the same device over a physical serial port on the host server (server 2012 R2). I am using Hyper-V as the Hypervisor for the VM. I can see that setting up virtual COM ports is possible in the settings for the VM, but from my research into the subject it seems that directly mapping a virtual COM port to a physical one is not possible within Hyper-V without using 3rd party software.
My question is this: how do I allow my virtual machine to access the physical serial port of the host machine through Hyper-V, and if I can not do this through Hyper-V, which hypervisor will allow me to do this?
Hyper-V does not support passing through COM ports. You are out of luck on this one.
I found the answer to this question in this blog post here http://www.goodjobsucking.com/?p=214
using a program called com0com http://com0com.sourceforge.net/ you can set up a virtual COM port through the network that connects to the physical COM port on the host machine.
follow the instructions in the blog post to get this set up.
From my personal experience, com0com does work well most of the time. For some unknown reason, certain applications (e.g. Suunto Dive Manager) fail to detect the com0com virtual ports, and you'll have to use another solution. Performance of the Eltima VSPD https://www.virtual-serial-port.org/ appears to be better sometimes. Windows and Virtual Machine interact well in this case.