I’m writing an application that communicates with the serial port to control a device. The development environment is on a virtualized Windows 2003 R2 machine hosted on a Windows Vista machine. When I try to map the COM ports through virtual PC so they can be use in the virtual machine, I get the following error right after the machine begins to boot:
There was an error trying to open the following COM port on your physical computer: \.\COM2 Before this port can be connected to your virtual machine you must verify that a device is attached to the port and that it is not being use by another process.
I’ve tried remapping the serial port to different ports on the virtual machine and also tried changing the port configuration on the host… No dice…
I’m not 100% certain that the serial ports are working correctly, but I’m not sure how to test them short of writing an application to do so. Any help would be much appreciated.
Thanks very much!
Thanks for the quick response, Chris. I think I have it figured out. As it turns out, you apparently have to have a device connected to the mapped COM port in order for the VM to successfully use the port. I did end up writing a quick app to test the ports and found it on the host system. I then took that knowledge and mapped that port (and only that port) to the VM… Viola! It works!