Attach USB device to Hyper-V guest machine

Omid Shojaee 101 Reputation points
2022-01-24T12:21:15.937+00:00

Hello,

We have a software installed on one of our Hyper-V guest machines running Windows 2022 Datacenter edition. This software requires a hardware lock which is a USB device. The device is inserted into the USB port of the server, and the host machine sees it as an Input Device.

I need to somehow "attach" that USB device to the guest machine permanently and make it visible to the guest OS otherwise that software won't work. What is the solution?

The host machine is Windows 2022 Datacenter edition.

Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
1,952 questions
No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Some One 26 Reputation points
    2022-08-28T02:16:05.917+00:00

    @Leon Laude , seems you are avoiding the real question...

    The answer is a big NO. Hyper-V CANNOT have pass-trough USB device other then storage. I.e. No ZigBee dongle, No Intel Neural Net USB dongles, no MFA/2FA dongles, not crypto tokens. I'm very surprised as VMWare ESXi had it up front in the beginning in early versions and it works great, and no "special disabling" of the device is required LOL.

    very disappointed in Microsoft yet again.

    5 people found this answer helpful.

  2. Nathan Freeman-Smith 16 Reputation points
    2023-01-23T10:58:02.3833333+00:00

    On host machine:

    1. Press Win+R type gpedit.msc and hit enter
    2. Go to Computer configuration > Administrative templates > Windows Components > Remote Desktop Services > Remote Desktop Connection Client > RemoteFX USB Device Redirection
    3. Select the only GPO there and Enable it and change the access rights to "Administrators and Users"

    On VM:

    1. Press Win+R type gpedit.msc and hit enter
    2. Go to Computer configuration > Administrative templates > Windows Components > Remote Desktop Services > Remote Desktop Session Host > Device and Resource Redirection
    3. Select GPO "Do not allow supported Plug and Play device redirection" and disable it

    Reboot both machines and voila you can redirect anything to VM. When you connect via RDP a third icon next to Connection info icon will show up click on that and you can select anything local to be redirected to RDP.

    2 people found this answer helpful.

  3. Leon Laude 85,151 Reputation points
    2022-01-24T12:33:51.57+00:00

    Hi @Omid Shojaee ,

    It's not as straight forward, but you could follow along the guide over here:
    https://adamtheautomator.com/hyper-v-usb-passthrough

    Edit: If you want to add USB devices, you'll likely need a third-party solution.

    ----------

    If the reply was helpful please don't forget to upvote and/or accept as answer, thank you!

    Best regards,
    Leon