locked
2012 Datacenter redirecting com ports to my VM RRS feed

  • Question

  • I have just installed Windows 2012 Datacenter and enabled Hyper-V.  I also installed a pci-e card to increase my serial ports x 2.

    After installing a VM server on Windows 2008 R2, I'm trying to figure out how to get com 3 and com 4 enabled for the newly created VM.  Is it possible?  The settings states something about name pipes, how do I configure name pipes so my VM will recognize com 3 and com 4?

    ~ wes


    wes chew

    Tuesday, January 29, 2013 5:20 PM

Answers

  • Hi!

    Physical ports redirection to a VM is not supported on Hyper-V (it never has, and according to prior MSFT responses, it never will).

    The usual recommendation is to connect the COM ports from inside the VM to a hosting machine (could be your Hyper-V host, but Microsoft does not recommend any other applications or roles running besides Hyper-V at host level) using a sharing serial ports over ethernet software, like this one:

    http://www.eltima.com/products/serial-over-ethernet/

    A forums user created his own application once, which allows you to redirect virtual machines configured named pipes to actual serial ports on the Hyper-V host:

    https://github.com/downloads/albertjan/PipeToCom/NP2COM.zip

    It's not an official piece of software, it's not recommended or supported, and by using this you might put your Hyper-V server in an unsupported state. You can always try it, but beware of these facts and the possibility that it could cause damage to something. I haven't tried this myself.

    The recommended setup to let the VM connect to external resources from it's own OS is actually about enhancing flexibility. It allows the VM to be migrated to other Hyper-V hosts, by not making it dependent on unique hardware in the configuration, locking it to a single Hyper-V server.


    • Edited by Mike_Andrews Tuesday, January 29, 2013 9:03 PM
    • Proposed as answer by Kareem Behery Wednesday, January 30, 2013 9:03 AM
    • Marked as answer by Lawrence,Lu Wednesday, February 6, 2013 2:28 AM
    Tuesday, January 29, 2013 8:56 PM
  • Hi,

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as 'Answered' as the previous steps should be helpful for many similar scenarios.

    If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.

    In addition, we'd love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems.

    Thanks!


    Lawrence

    TechNet Community Support

    • Marked as answer by wchew Wednesday, February 6, 2013 4:13 PM
    Wednesday, February 6, 2013 2:28 AM
  • I decided to just get a dedicated server for this project.

    wes chew

    • Marked as answer by wchew Wednesday, February 6, 2013 4:14 PM
    Wednesday, February 6, 2013 4:14 PM

All replies

  • Hi!

    Physical ports redirection to a VM is not supported on Hyper-V (it never has, and according to prior MSFT responses, it never will).

    The usual recommendation is to connect the COM ports from inside the VM to a hosting machine (could be your Hyper-V host, but Microsoft does not recommend any other applications or roles running besides Hyper-V at host level) using a sharing serial ports over ethernet software, like this one:

    http://www.eltima.com/products/serial-over-ethernet/

    A forums user created his own application once, which allows you to redirect virtual machines configured named pipes to actual serial ports on the Hyper-V host:

    https://github.com/downloads/albertjan/PipeToCom/NP2COM.zip

    It's not an official piece of software, it's not recommended or supported, and by using this you might put your Hyper-V server in an unsupported state. You can always try it, but beware of these facts and the possibility that it could cause damage to something. I haven't tried this myself.

    The recommended setup to let the VM connect to external resources from it's own OS is actually about enhancing flexibility. It allows the VM to be migrated to other Hyper-V hosts, by not making it dependent on unique hardware in the configuration, locking it to a single Hyper-V server.


    • Edited by Mike_Andrews Tuesday, January 29, 2013 9:03 PM
    • Proposed as answer by Kareem Behery Wednesday, January 30, 2013 9:03 AM
    • Marked as answer by Lawrence,Lu Wednesday, February 6, 2013 2:28 AM
    Tuesday, January 29, 2013 8:56 PM
  • Hey Mike,

    I tried going through the VM to attach to the com3 and com4 on the hosting server with no luck.  It did find some unknown devices on the VM.  So I used the same drivers from the hosting server, but did not find the hardware.  I didn't think I needed to install drivers on the VM as long as the hardward was working on the hosting server.  Should the com3 and com4 devices be visible on the device manager on the VM?   

    Please let me know your thoughts.     


    wes chew

    Tuesday, January 29, 2013 9:50 PM
  • Hi,

    > I also installed a pci-e card to increase my serial ports x 2.

    Did you mean you want the guest Virtual Machine to access these new physical serial posts?

    Virtual serial (COM) ports in virtual machine can be attached to a named pipe to communicate with a local or remote physical computer, but is not available to access a physical COM port, this is by design.

    For more information please refer to following MS articles:

    Hardware Considerations for Hyper-V in Windows Server 2008
    http://technet.microsoft.com/en-us/library/cc816844(v=WS.10).aspx
    How to debug a virtual machine on a host computer
    http://support.microsoft.com/kb/871171
    Configuring a Hyper-V VM For Kernel Debugging
    http://blogs.msdn.com/b/ntdebugging/archive/2011/12/30/configuring-a-hyper-v-vm-for-kernel-debugging.aspx

    Hope this helps!

    TechNet Subscriber Support

    If you are TechNet Subscription user and have any feedback on our support quality, please send your feedback here.

     



    Lawrence

    TechNet Community Support

    Wednesday, January 30, 2013 6:19 AM
  • From your reply I understand you tried the NP2COM, and like I said, I haven't tried this myself.

    The virtual machine will not see the actual COM ports, only its named pipe ports, so simple serial transmission through a null modem cable should work fine.

    The use of NP2COM is highly experimental as it is not a true COM port redirection technique. Very little is known about this as it has not been properly researched by Microsoft or Hyper-V professionals.

    It's as a small application that does not even register as a service, so I advise you not to go into production with this.

    Using serial-over-ethernet where the machine with the physical ports acts as server and the virtual machine itself acts as client, is the recommended way to go.


    • Edited by Mike_Andrews Wednesday, January 30, 2013 7:53 AM
    Wednesday, January 30, 2013 7:50 AM
  • Hi,

    As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as 'Answered' as the previous steps should be helpful for many similar scenarios.

    If the issue still persists and you want to return to this question, please reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish.

    In addition, we'd love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems.

    Thanks!


    Lawrence

    TechNet Community Support

    • Marked as answer by wchew Wednesday, February 6, 2013 4:13 PM
    Wednesday, February 6, 2013 2:28 AM
  • I decided to just get a dedicated server for this project.

    wes chew

    • Marked as answer by wchew Wednesday, February 6, 2013 4:14 PM
    Wednesday, February 6, 2013 4:14 PM