Cookie
Electronic Team, Inc. uses cookies to personalize your experience on our website. By continuing to use this site, you agree to our cookie policy. Click here to learn more.

How to enable Hyper-V USB passthrough

Olga Weis Olga Weis
Feb 14, 2023

In this article, we will consider four different ways of forwarding USB devices from a host PC to a Hyper-V virtual machine and compare the pros and cons of each method. If you are not ready for a long read, just start sharing USB in Hyper-V in a few clicks with USB Network Gate. Otherwise, read on to know more.

the best USB over Ethernet software

Hyper-V USB passthrough via network redirection

USB Network Gate enables almost any USB device, such as dongles, pen drives, smartcards, printers, webcams, etc. to interface with a Hyper-V virtual machine. It can use any networked computer with a physical USB connection as a host for Hyper-V USB devices.

usb network gate hyper-v passthrough

Microsoft Corporation designed Hyper-V to run on the Windows Server Core and offers only a command-line interface. Consequently, installing third-party software on it may be challenging, but not with USB Network Gate that comes with a built-in CLI in addition to a more user-friendly GUI.

For a lot of customers that want to use USB devices in their virtual machines, Hyper-USB V's compatibility is a serious worry. The lack of such a capability severely restricts the applicability of Hyper-V-based systems.

How to enable network-level Hyper-V USB access

Now we’ll cover how to use USB Network Gate to access Hyper-V USB devices. The following Hyper-V USB passthrough server method can be completed in 4 simple steps:
1
Install USB Network Gate on both host and guest machines.
2
Open the app, and share the USB device attached to the Hyper-V host.
 share USB Hyper-V host
3
While operating the virtual machine, open the USB Network Gate app and find the shared USB device.
 connect USB device to Hyper-V guest machine
4
Click "Connect".

Using USB Network Gate to mount and access Hyper-V USB devices to a Virtual Machine is easy, fast, and convenient.

USB Network Gate
Work with USB peripherals in Hyper-V virtual machine

Users will find their USB peripherals in the virtual machine’s Device Manager window, allowing them to access the devices with the same level of control they would experience if the device was physically connected to the computer they’re physically working from.

The pros and cons of using USB Network Gate to access a USB in Hyper-V:

icon pros Pros:

  • Compatibility with multiple platforms (Windows, Linux, Mac, Android, Raspberry Pi OS);
  • Requires minimal configuration to work across the network;
  • Supports virtually any USB device.

icon cons Cons:

  • USB redirection requires network connectivity.

Video tutorial to access USB in Hyper-V

You can find detailed instructions on attaching a USB device to a Hyper-V guest machine over the network in the following video:

Access Android remotely over Network

Server-side Hyper-V USB passthrough via SCSI Controller

Using server-side redirection, you can connect a USB device to the Hyper-V host machine. As a result, the device would be accessible to the Hyper-V virtual machine as though it were physically linked to it.

Server-side Hyper-V USB passthrough is not without its advantages and disadvantages as outlined below.

icon pros Pros:

  • Compatible with Windows and Linux Hyper-V VM users;
  • You can manage access to USB storage devices.

icon cons Cons:

  • Difficult to configure;
  • It only works with non-detachable USB mass storage devices;
  • Only one machine (host or virtual) can be connected to a USB storage device at once.

The following procedures outline the process of enabling server-side Hyper-V USB passthrough.

1
Launch the Disk Management app. To do so, open Disk Management from the Start context menu. Alternatively, press Win + R to open the Run program and open diskmgmt.msc.
 run diskmgmt.msc
2
Since the host and VM can not access the USB drive simultaneously, you need to set the USB drive offline on the host first. To set the USB drive offline, find it among the devices listed in Disk Management, right-click on it and select the Offline option.
 set the USB drive offline
3
Now that the host operating system has no direct access to the USB storage, you can enable Hyper-V USB passthrough. Simply open the Hyper-V manager, right-click on the VM that requires access, and choose Settings in the context menu.
 open Hyper-V machine settings
4
Find the SCSI tab on the left side of the settings menu and click on it. Next, click Add under the Hard Drive option.

add Hard Drive in SCSI Controller

Note: Rather than employing a SCSI Controller, you can add the hard drive to the IDE Controller. However, you should note that users won't be able to disconnect it from the VM without first shutting it off. We advise introducing the disk as a SCSI device that may be removed from an active VM to save time.
5
Select the Physical hard drive option under SCSI Controller > Hard Drive from the menu on the left, then select the USB drive. Ensure that the disk number on the selected drive must match the disk you pulled offline in Disk Management. Click OK to save your changes.

Launch your Hyper-V VM's File Explorer after adding the drive. The USB storage drive inside the VM should now be visible.

Client-side USB to Hyper-V passthrough with Enhanced Session Mode

The Enhanced Session Mode offers an alternate method to use USB devices in a Hyper-V virtual machine. This client-side state allows the VM to use any USB device connected to the host PC by logging in to the console and choosing which devices to reroute.

Enhanced Session Mode has the following pros and cons.

icon pros Pros:

  • It allows multiple machines to access the same USB device simultaneously.
  • It is not restricted to USB mass storage devices, allowing you to use flash drives, printers, and scanners.

icon cons Cons:

  • It only supports the Windows operating system on guest VMs.
  • You must select the USB devices you want to attach before launching a virtual machine.

Suggestion: Enhanced session mode is automatically enabled if your Hyper-V host is running Windows 10 or Windows 8.1, so you can skip step 4.

Using Enhanced Session Mode, follow these instructions to access USB devices inside Hyper-V.

1
Launch the Hyper-V manager on the host computer. Then, right-click on the name of the host and select Hyper-V Settings in the context menu that appears.
 open Hyper-V settings via context menu
2
You can find the Server and User sections in the Setting window. Select Enhanced Session Mode Policy in the Server panel and tick the checkbox next to Allow enhanced session mode.
 Select Enhanced Session Mode Policy
3
Next, select Enhanced Session Mode from the User section and check the Use enhanced session mode box. Click OK to confirm and save your changes.

Enhanced Session Mode from the User section
You can now access USB devices inside any Hyper-V virtual machine after enabling the Enhanced Session Mode.

Note: Close any active Hyper-V VM sessions at this point.
4
Launch the Hyper-V Manager and double-click the virtual machine's name.
5
To set up your VM's upcoming connections, select Show Options in the pop-up menu.
6
Next, select Local Resources and click More under Local Devices and Resources.
7
Next, check the options “Other supported Plug and Play devices” and “Devices that I plug in later” and confirm by clicking OK.
8
Check the appropriate box in the Display tab to save this configuration for all subsequent connections.
9
Click Connect to effect your modifications.

Finally, start the Hyper-V VM and open File Explorer to check the devices are connected to the system.

RDP-based Hyper-V USB Passthrough

The aforementioned techniques of Hyper-V USB passthrough are quite powerful and will work in most situations. However, they will only work with the Hyper-V Virtual Machine Connection (VMConnect) client app.

The critical distinction between VMConnect and Remote Desktop Protocol (RDP) is that VMConnect allows you to access Hyper-V host-connected devices. In contrast, RDP can only access USB devices tied to the client.

The significant advantage of this technique is that it automatically works when RDP connectivity is enabled and is completely hypervisor independent. Nevertheless, it may not work with all devices and only Windows operating systems are supported.

Simply follow these instructions to attach a USB device to VM Hyper-V during a remote desktop session.

1
You will need to provide Remote Desktop Connections access on your VM. Connect to your virtual machine and look in the Control Panel for the System and Security options. Click on Allow remote access.
 Click on Allow remote access
2
Ensure the Allow remote connections to this computer and Allow remote assistance connections to this machine boxes are checked, then click OK in the Remote tab of the System Properties window.
 Allow remote connections to this computer and Allow remote assistance connections to this machine boxes checked
3
Press Win + R to launch the Run program and type mstsc.exe in the text box. Hit Enter to run the Remote Desktop Connection application.
4
Click the Show Options button to expand the RDC dialog box.
 Click the Show Options button
5
Open the Local Resources tab and click More in the Local Devices and Resources section.
 Open the Local Resources tab
6
In the menu that appears, enable the Other supported Plug and Play (PnP) devices checkbox. Click OK.
 enable the Other supported Plug and Play (PnP) devices checkbox
7
Go back to the General settings tab and connect to your virtual machine using its username and IP address.
 Go back to the General settings tab and connect to your virtual machine
8
To launch your Remote Desktop session, click Connect.
9
Log in to the VM and check if the added USB devices are shown in File Explorer.

Conclusion

Enabling Hyper-V USB passthrough is considerably less complicated when you follow the correct procedures. Each method offers its advantages and disadvantages and works best for specific scenarios. Armed with this knowledge you can now choose the best technique to access any USB device inside a Hyper-V virtual machine.

Top choice

USB Network Gate

  • Rank 4.7 based on 372+ users
  • Requirements: OS: Windows 7 SP1/8/8.1/10/11; Windows Server 2008 R2/2012/2012 R2/2016/2019/2022
    Architectures: x86, x64, ARM64
    . 9.33MB of free space.
  • Version 10.0.2593. (1 Nov, 2023). Release notes
  • Languages: Deutsch, English, Français, Italiano, 日本の, 한국어, Polski, Português, Русский, Español, Tiếng Việt, Nederlands, 中文
  • Pricing: 159.95 USD