Share via


USB Pass Through / Com Port Via Named Pipes

Question

Monday, January 27, 2014 9:53 PM

I am currently in need of redirecting a Com Port to a Hyper-V Guest via named pipes from the Host Machine.

I cannot find any good documentation on the subject.

If Hyper-V supported USB Pass through like ESXi does i would just plug a USB Serial port and be done with it.

But alas Hyper-V seems not to support either.

How are people supporting older COM Port requirements on newer Virtual Machines?

And yes I have ESXi Servers, but in this particular implementation the Customer wants Windows 2008R2 Hyper-V.

All replies (6)

Monday, January 27, 2014 10:13 PM ✅Answered

USB: you can, as long you are connected via RDP/Enhanced session mode from the host to the guest. It will disappear when you close the session. But I would not recommend to do it and would use USB to Ethernet appliances instead.

Named Pipe Documentation: http://msdn.microsoft.com/en-us/library/aa365590(VS.85).aspx

Regards,

Benedict


Monday, January 27, 2014 10:19 PM ✅Answered

The COM port redirection has been there since the beginning as it is the only way to debug some operating systems or certain phases of the boot process.

This is from the VM to the host, to capture debugging - it is not passthrough.

Described here: http://blogs.msdn.com/b/ntdebugging/archive/2011/12/30/configuring-a-hyper-v-vm-for-kernel-debugging.aspx

USB passthrough today is all RDP connection based - user session based.  It is not at the machine level.  That requires the digi solution posetd previously.

Brian Ehlert
http://ITProctology.blogspot.com
Learn. Apply. Repeat.
Disclaimer: Attempting change is of your own free will.


Monday, January 27, 2014 10:00 PM | 1 vote

Hello,

Hyper-V does not offer the ability to bind local hardware ressources to VMs because it would limit Live-Migration capability.

USB pass through is done via RDP and is for using card readers e.g. in your VM but not USB-Dongles on the host.

There are USB to Ethernet and Com to Ethernet appliances that are hardware independent from the host:

http://www.digi.com/products/usb/anywhereusb

With Com Ports:

http://www.digi.com/products/model?mid=3291

There is a similar thread here:

http://social.technet.microsoft.com/Forums/windowsserver/en-US/5fec3326-11a6-465d-b820-ee15ddf929a2/redirecting-com-port-to-named-pipes-on-server-2008?forum=winserverhyperv

The same does apply for Server 2012 R2 for Com-Ports as well.

Regards,

Benedict


Monday, January 27, 2014 10:07 PM

So if I do usb pass-through to the VM from the Host I cannot see a USB Serial adapter?

The thread you mention does not explain how to redirect the physical port to the virtual guest.

I can see on the VM guest that there is a serial port redirection to a named pipe.

Where is the documentation to use said feature is what I am asking I guess.


Monday, January 27, 2014 10:16 PM

Thanks.


Monday, December 5, 2016 7:47 PM

You can pass a USB external hard drive to a HV guest by flagging it as a Mass Storage device.  Sorry can't do normal USB and here is why.   I think people get confused with Type 1 and Type 2 Hypervisors.

Read this for a better explanation.

http://www.altaro.com/hyper-v/hyper-v-usb/

Hyper-V Cannot Passthrough Non-Disk USB

The most common question/complaint that I see regarding Hyper-V is that it cannot perform passthrough operations for USB devices. It is commonly (and negatively) compared to applications such as VMware Workstation and Oracle VirtualBox, which can perform USB passthrough with ease. The very sharp distinction to be made here is that Hyper-V is a type 1 hypervisor whereas all of the products that provide simple USB passthrough are type 2 hypervisors. In a type 2 hypervisor, the management operating system is installed directly to the hardware and the hypervisor is just another application that runs within it. Applications have the ability to exclusively capture a USB port to prevent other applications from using it if they like; this is why it’s so easily done in a type 2 hypervisor. If you’ve ever used a type 2 hypervisor in this way, you’ll notice that they explicitly tell you that the USB device can be attached to the parent or a guest — there’s no sharing or divvying up resource access or anything of the sort.

Type 1 hypervisors are not applications. They are kernels.......