×


USB device passthrough to Hyper-V - How to get this done

Are you trying to know more about USB device passthrough to Hyper-V?

This guide is for you.


Unfortunately, USB passthrough is not natively supported in Hyper-V environments, but you can still perform Hyper-V USB passthrough by Enabling Enhanced Session Mode. This means that you will run the Remote Desktop Protocol (RDP) session.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve Hyper-V related errors.

In this context, we shall look more into USB passthrough and how to perform it.


More about Hyper-V USB Passthrough ?

The USB passthrough allows us to access the USB device from within a VM. Unfortunately, USB passthrough is not supported in Hyper-V environments, but we can still perform Hyper-V USB passthrough using the following approaches:

1. Enable Enhanced Session Mode

2. Run the Remote Desktop Protocol (RDP) session

3. Install network-based USB solutions

4. Install software-based USB solutions


Hyper-V USB Passthrough with Remote Desktop Connection

Our Support Experts follow the below steps to perform Hyper-V USB passthrough with Remote Desktop Connection.

1. First, we enable remote desktop connections on our VM. For that, we connect to the VM and open Remote System Settings in the Control Panel (Control Panel >> System and Security >> Allow remote access).

2. As a result, the System Properties menu will open. We check the Allow Remote Assistance connections to this computer Ensure that the Allow remote connections to this computer box is also checked. Then we click OK.

3. Now, we can connect to the machine remotely. We connect to a USB device by enabling an RDP session.

4. We run the mstsc.exe command to open the Remote Desktop Connection window. Then we click Show Options, select the Local Resources tab and press the More button.

5. In the new menu that opens, we can choose which devices and resources on this computer we wish to use in a remote session. USB devices fall under the Plug and Play devices category. We check the corresponding box and click OK.

6. Finally, we click Connect to initiate an RDP session. Here, we will be asked to confirm our selection once again. We click Connect if everything is OK and we trust the remote computer.


USB Passthrough to Hyper-V with Enhanced Session Mode

Enhanced Session Mode enables redirection of local devices and resources to a virtual machine session using the Virtual Machine Connection tool. In Windows 10 or Windows 8.1, Enhanced Session Mode will be available by default. However, in Windows Server 2012 R2 or Windows Server 2016, we need to manually enable the Enhanced Session Mode functionality.

Here are the steps that we follow:

1. First, we connect to a computer hosting the VM.

2. Next, we open Hyper-V Manager. Then we right-click the host’s name and select Hyper-V Settings.

3. In the Server section, we click Enhanced Session Mode Policy and check the box Allow enhanced session mode.

4. Then in the User section, we click Enhanced Session Mode and check the box Use enhanced session mode.

5. After that, we click OK to save changes.


The next stage is to choose the local resource we would like to connect to.

The local resources include printers, local drives, audio devices, and USB drives. 

For that, we follow the below.

i. First, we open Hyper-V Manager and start the VM by double-clicking its name.

ii. Before logging into the VM, a configuration window will pop up. We click Show Options to extend the set of configurations for future connections to this VM.

iii. We select the Local Resources section. Under Local devices and resources, we click More.

iv. If we want to enable VM access to a local USB device, we check the box Other supported Plug and Play (PnP) devices, as well as the box Devices that I plug in later beneath it. Click OK.

v. In the Display section, we can also select Save my settings for future connections to this virtual machine. We then click Connect if we wish to implement any changes.


[Need urgent assistance with Hyper-V queries ? – We are here to help you. ]


Conclusion

This article covers how to perform Hyper-V USB Passthrough. A USB passthrough is referenced when a keyboard has female USB ports for other devices to be plugged into the keyboard. USB passthroughs requires more than one USB port to be used by the keyboard in order to pass the USB through to the PC, often requiring an additional connection to the host system for powered ports.


What does Hyper-V USB passthrough Mean?

Hyper-V USB passthrough functionality allows you to access the USB device from within a virtual machine. There is a way to enable USB passthrough on Hyper-V for a memory stick, but you’ll have to use Windows storage subsystem.


Known issues with Hyper-V USB device passthrough organized with native methods:

1. Platform restrictions: said methods rely upon Windows storage subsystem so using them to set up Hyper-V USB passthrough on Linux (or any other OS that’s not Windows) is out of question, sadly.

2. An extremely limited list of supported devices: for the native methods to work, your USB peripheral must be recognized as a “Mass Storage Device”. No exceptions.

3. No sharing: once your device is set in passthrough mode, you can access it only from the guest OS. That’s why using these methods to permanently connect a USB to Hyper-V is definitely not the best idea.

4. Poor choice for a cloud: with these methods, the USB device is always locked to a specific host PC while there's no way to anchor a cloud-based Hyper-V guest system or preestimate where it's going to run for your next session.


Advantages of using RDP for Hyper-V USB passthrough:

1. Works for literally any hypervisor you can name;

2. Instant access to USB devices, once RDP connection is up;

3. Group Policy feature for overall control;

4. All USB devices plugged into your host PC are accessible from a virtual machine.


To enable USB device in Hyper-V with the Enhanced Session Mode:

1. On a host computer, you go to the Hyper-V Manager, right-click the name of the host and choose Hyper-V Settings.

2. In the Setting window, you will see the Server and User sections. Select Enhanced Session Mode Policy in the Server section and allow the enhanced session mode by checking the corresponding box.

3. Now, choose "Enhanced Session Mode" in the User section and check the “Use enhanced session mode” box.

4. Click OK and the changes will be saved.


To allow Hyper-V access to attached USB devices:

1. Start the Hyper-V Manager and double-click the name of your virtual machine.

2. In the pop-up window, click “Show Options” to configure your VM’s future connections.

3. After that, go to the tab “Local resources” and click “More” in the section “Local devices and resources”.

4. Then, check the boxes “Other supported Plug and Play devices” and “Devices that I plug in later”. Hit OK.

5. If you want this configuration to be saved for all future connections, check the corresponding box in the “Display” tab. Click “Connect” to implement the changes.