How to make USB dongle recognizable in Hyper-V with the help of USB Network Gate
Let’s say you have Hyper-V OS installed on your PC. Working in the virtual machine, you realize that a USB dongle plugged into the host computer is not accessible from the guest operating system. You don’t necessarily care how to redirect USB over the network. You just want to connect USB device to Hyper-V VM as though it were connected to the virtual machine physically.
Hyper-V USB dongle passthrough in 3 steps:
- Install USB Network Gate on both your host (server) and guest (client) operating systems;
- Share a USB device plugged into the server PC over the network;
- In the virtual machine find the shared USB peripheral in the software interface and click ‘Connect’. That’s it! The device will appear in the Device Manager of your VM like it was attached locally. It’s really that simple. What more could you want?
Video step-by-step instruction:
The pros and cons of enabling Hyper-V USB support with USB Network Gate:
- Compatibility with multiple platforms (Windows, Linux, Mac)
- Stable USB connections
- Requires minimal configuration to work across the network
- Supports virtually any USB device
- USB redirection requires network connectivity
- The software isn’t free
Remote Desktop Protocol
Now, let’s consider another way to provide Hyper-V USB device passthrough. If you connect to your Hyper-V virtual machine from a host PC over Remote Desktop Protocol (RDP), you can virtualize your local resources like hard drives, USB ports, etc. and make them accessible to the guest OS. This option is a good workaround for Windows OS users. The Windows 10 Hyper-V USB passthrough feature is available in the client options of the Remote Desktop Connection.
To forward USB devices to your VM over RDP, you need to follow these simple steps:
- Open Remote Desktop Connection options.
- Go to the Local Resources tab and click ‘More’.
- In the dialog that will appear, choose a USB drive you’d like to use in your Hyper-V OS. Hit ‘Ok’. Now, once you connect to an RDP session on any host, the device will be available for access from your virtual machine.
- Configured USB pass-through options are applied automatically as soon as an RDP connection is established.
- USB redirection is totally independent of the hypervisor.
- Group policy lets control and limit USB connections.
- Hyper-V USB dongle can be accessed only within RDP session.
- Not all USB devices are supported.
- Low data transfer speed.
- Works only with Windows operating systems.
As you can see, there are different ways to add USB device to Hyper-V virtual machine. Considering the ease of use and the range of devices supported, it’s easy to see that the software tool, USB Network Gate, is a more convenient and efficient solution.
How to mount USB drive to Hyper-V
To connect a USB drive to a virtual machine install it as virtual hard disk in Hyper-V virtual environment. You can do it if you know the size of the drive, to find it out on your host machine click Computer, find your removable disk, right-click to display the context menu and go to Properties. General tab will have information on the size of your hard drive in Bytes and GB.
How to install a USB drive as a virtual hard drive:
- Right-click on your Hyper-V server, choose New > Hard Disk, or do the same from Actions menu; follow the instructions.
- When prompted enter a name for your drive, click Next.
- Choose ‘Copy the content of the specified physical disk’ and enter the details to identify the disk.
Copying the content of the removable storage and creating the USB.vhd file might take a while, it depends on its size. The amount of free space does not matter, a vhd file is created with the entire size of the removable storage.
- Choose Settings on your virtual machine, select SCSI Controller – see the left pane; select Hard drive – see the right pane, click Add.
- Click Browse and choose to open the vhd file to which you mounted your removable storage. Your removable storage should be displayed as a drive.
If ‘My Computer’ does not show it as a removable storage, it might be because the drive is offline. To check it, go to your VM, right-click Computer, choose ‘Manage’ or ‘Administrative Tools’ and go to Computer Management.
Expand Storage and select Disk Management. Red arrow icon means that the disk is offline, right-click the disk and in the context menu displayed select Online. Once your disk gets Online status, a drive letter will be assigned to it.
There are certain drawbacks to this method: you will have to reproduce the entire actions sequence for each USB drive connected to your Hyper-V virtual environment. As we already mentioned, creating a vhd file might consume some time, it directly depends on the size of your USB disk.