HOW TO REDIRECT USB DONGLE IN HYPER-V

Accessing USB devices from virtual environments such as VMware and Hyper-V is useful in many situations. In this article, we are going to show you how to make a USB recognizable in Hyper-V either as a host or client.

The ability to access USB devices from within a virtual machine (VM) is known as USB passthrough. You can attach the USB device to the machine that is running the VM or you can implement USB passthrough at the Hyper-V host level.


  1. How to get Hyper-V recognise USB
  2. Software to access USB in Hyper-V
  3. Hyper-V Enhance session mode - access USB with RDP client
  4. The bottom line

How to get Hyper-V recognise USB


Hyper-V USB passthrough can be performed at the client level or at the host level if you are connecting to USB storage devices.

Accessing USB devices

Server side USB passthrough in Hyper-V


It is not as easy to implement Hyper-V USB passthrough as it is to set it up in VMware. Let’s take a look at how it’s done in the following demonstration.

In this example, we will attach a 32GB USB drive into a Hyper-V server and designate it as Drive E. The host operating system immediately sees the drive as available system storage. A potential issue is that direct access to the USB device is limited to one operating system at a time. In order to make the device available to the Hyper-V clients we need to take it offline and remove the logical connection to the host OS.

We do this by opening the machine’s Run prompt and executing the DISKMGMT.MSC command. This starts the Disk Management console. Locate the entry for your USB disk and right-click on the disk. You need to use the actual disk, not the drive letter or volume name.

There is an Offline option in the shortcut menu which will be used to take the disk offline. The Disk Management Console might not offer the Offline option for small USB storage devices. If that is the case, passthrough for USB in Hyper-V will not be able to be implemented.

Open the Hyper-V Manager after you have successfully taken the USB device offline. Select the VM that requires access to the device. Right-click on it and select Settings from the shortcut menu which opens the VM settings screen. Next, you need to select the Hard Disk option for the SCSI controller and click the Add button. When the next screen displays, select the Physical Hard Disk option and use the drop-down menu to select your USB storage device.

Server side USB passthrough in Hyper-V

The VM should now be able to recognize and access the USB device. You may need to use the VM’s Disk Management Console to add a drive letter if the device is not immediately visible.

Access USB dongle and HID devices in
Hyper V


Some software programs require a hardware USB dongle for correct functioning. But what if you decide to work with a program that requires a hardware key in virtual environment? As you perhaps know there is no full-blown mechanism of connecting USB devices to virtual machines in Hyper-V. When server is virtualized, all references to USB bus and devices connected to it are lost.

When working in Hyper-V, there are times when you need to know how to access a USB device. You might need to present security credentials and need to use Hyper-V with a USB dongle. Without obtaining access to the device you cannot perform your work. Another case is if you are in a virtual machine (VM) and need HID access. You either need to be physically connected to the machine or use Hyper-V USB passthrough on your Windows 10 computer hosting the virtual session.

The software to work with USB in Hyper-V


USB Network Gate is a client-server solution, meaning that its server side gives access to USB devices to other computers on the network or to Virtual Machines, and client side allows using them as local resources. You can use any computer connected to the network as a server, either Windows, Mac or Linux one.

USB Network Gate provides a solution to the question of how to access a USB drive in Hyper-V. The specialized communication software enables you to attach USB devices in Hyper-V by sharing USB devices across a network.
UNG logo

USB Network Gate

Share USB over Ethernet on Windows
4.9 Rank based on 179+ users, Reviews(72)
Download 14-day trial, You can share only 1 local USB-device
USB Network Gate

Step by step guide


Here’s how to access USB in Hyper-V by employing the dedicated software solution of USB Network Gate:

  • Install the software on the host and guest operating systems.
  • Share a device that is physically attached to the host over your network.
  • On the client VM locate the USB peripheral in the application and click ‘Connect’.

That’s how to mount a USB drive in Hyper-V. It really is that easy. You will see the peripheral in your VM’s Device Manager and be able to access it as if it was directly connected to your machine.

USB Network Gate Pros and cons to access USB in Hyper-V


Electronic Team Inc. software solution requires just a few easy steps to implement Hyper-V USB passthrough. No additional hardware or configuration is required. Here are the pros and cons of using USB Network Gate to use USB devices in Hyper-V.

Pros

  • Virtually all USB devices are supported.
  • Simple configuration to implement USB access across the network.
  • USB Network Gate is compatible with the Linux, Mac and Windows operating systems including Windows 10.
  • Creates secure USB connections.

Cons

  • USB Network Gate is commercial software and has a financial cost.
  • Network connectivity is needed to redirect USB traffic.

Hyper V Enhance session mode - access USB with RDP client


To copy files between virtual machines in earlier versions of Hyper-V you employed a network file copy or Remote Desktop Connection session. Both of these options entail having an operational network connection. Using the Virtual Machine Connection limited the amount of data that could be sent to the VM.

A similar method is used in enhanced session mode but the requirement to connect to the VM over the network is eliminated. All that is needed is a network connection to the Hyper-V host where the VM is running.

This feature of enhanced session mode can be instrumental in cases where a VM needs to interact with local devices but may not be able to achieve network connectivity. Here are some examples:

  • Printing to a local printer from a VM.
  • Using a USB-attached reader to log into a VM using a smart card.
  • Debugging issues encountered with a VM without requiring it to be network connected.

Developers can make use of Microsoft Hyper-V USB passthrough to test and debug USB applications from within a VM without relying on Remote Desktop Connection.

Hyper-V Manager is used to configure enhanced sessions. Simply select the Hyper-V server to be configured and click on ‘Hyper-V Settings’. Enable server settings in the Enhanced Session Mode Policy which will be used for all VMs running under the Hyper-V host.

Enabling the allow enhanced session mode setting determines if the guest VMs can make use of enhanced sessions. When enabled, enhanced session mode connections are allowed by Hyper-V if certain conditions are met. They are:

  • The OS of the virtual machine supports enhanced session mode.
  • The VM is running Remote Desktop Service.
  • The Virtual Machine Connection tools requested an enhanced session mode connection.
USB Network Gate is an effective and efficient solution for redirecting data from peripheral devices physically connected to a host OS to its hosted guest VMs. With USB Network Gate installed on the host and guest OS, the VM can use the USB device as if it had a direct, physical connection.
UNG logo

USB Network Gate

Share USB over Ethernet on Windows
4.9 Rank based on 179+ users, Reviews(72)
Download 14-day trial, You can share only 1 local USB-device
USB Network Gate


Disabling the allow enhanced session mode setting forces the Virtual Machine Connection tool to use the methods previously seen in pre-R2 Hyper-V releases.

Enabling User Settings

Enhanced session mode is used to configure user settings. Enabling this setting allows the Virtual Machine Connection tool to use enhanced session mode if it is available in the guest VM. The following conditions must be met for enhanced session mode to be used:

  • The OS of the guest VM supports enhanced session mode.
  • Remote Desktop Service is running on the guest.
  • Allow enhanced session mode is enabled on the Hyper-V host.

Bottom Line


So, does Hyper-V support USB devices? As we have demonstrated, the answer is yes. You can enable USB support in a few different ways, but we believe that using the USB Network Gate application is the easiest and most effective solution. It will save time when compared to using Hyper-V enhanced session mode and any other solution.

USB Network Gate

Requirements for Windows (32-bit and 64-bit): XP/Vista/7/8/10, Windows Server 2003/2008/2012/2016/2019
Also available on macOS, Linux OS and Android , 5.59MB size
Version 8.1.2013 (12th Jun, 2019) Release notes
Category: CommunicationApplication