You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Using a YubiKey USB device in a Hyper-V virtual machine
3
-
description: Provides guidance on using a YubiKey USB device for hardware encryption in a Hyper-V virtual machine (VM).
2
+
title: YubiKey USB Device Doesn't Appear in a Hyper-V Virtual Machine
3
+
description: Help resolve the issue where YubiKey USB device doesn't appear in a Hyper-V virtual machine (VM). Provides guidance on using a YubiKey USB device for hardware encryption in a Hyper-V VM.
4
4
ms.date: 08/14/2025
5
5
manager: dcscontentpm
6
6
audience: itpro
@@ -10,76 +10,67 @@ ms.custom:
10
10
- sap:virtualization and hyper-v\installation and configuration of hyper-v
11
11
- pcy:WinComm Storage High Avail
12
12
---
13
-
# Using a YubiKey USB device in a Hyper-V virtual machine
13
+
# YubiKey USB device doesn't appear in a Hyper-V virtual machine
14
14
15
-
This article provides guidance on using a YubiKey USB device for hardware encryption in a Hyper-V virtual machine (VM). It explains how to achieve USB passthrough in Hyper-V, a feature that is not natively supported, and provides alternative methods to enable this functionality.
15
+
This article helps resolve the issue where YubiKey USB device doesn't appear in a Hyper-V virtual machine (VM). It provides guidance on using a YubiKey USB device for hardware encryption in a Hyper-V VM. It explains how to achieve USB passthrough in Hyper-V, which is a feature not natively supported. It also provides alternative methods to enable this functionality.
16
16
17
-
## Prerequisites
17
+
> [!NOTE]
18
+
> Before proceeding with the following procedures in this article, ensure the following items:
19
+
>
20
+
> * You have administrative access to both the Hyper-V host and the VM.
21
+
> * The YubiKey USB device is connected to the Hyper-V host.
22
+
> * The VM is running an operating system that supports the YubiKey.
23
+
> * Remote Desktop Protocol (RDP) is enabled on the VM if you use the RDP method.
18
24
19
-
Before proceeding, ensure the following:
25
+
When you use Hyper-V, the YubiKey USB device doesn't appear in the VM or can't be accessed, even though it's connected to the Hyper-V host.
20
26
21
-
* You have administrative access to both the Hyper-V host and the VM.
22
-
* The YubiKey USB device is connected to the Hyper-V host.
23
-
* The VM is running an operating system that supports the YubiKey.
24
-
* Remote Desktop Protocol (RDP) is enabled on the VM if using the RDP method.
27
+
## Hyper-V doesn't natively support USB passthrough to virtual machines
25
28
26
-
## Symptoms
29
+
This issue occurs because Hyper-V doesn't include built-in support for USB passthrough. This limitation prevents USB devices connected to the host from being directly accessed by the VM. If you're accustomed to this functionality in other virtualization platforms, such as VMware, you might need clarification on how to achieve similar results in Hyper-V.
27
30
28
-
When using Hyper-V, you may encounter the following issue:
31
+
## Resolution 1: Use Enhanced Session Mode
29
32
30
-
* The USB device (YubiKey) does not appear in the VM or cannot be accessed, even though it is connected to the Hyper-V host.
31
-
32
-
This occurs because Hyper-V does not natively support USB passthrough to virtual machines.
33
-
34
-
## Cause
35
-
36
-
Hyper-V does not include built-in support for USB passthrough. This limitation prevents USB devices connected to the host from being directly accessed by the VM. Users who are accustomed to this functionality in other virtualization platforms, such as VMware, may need clarification on how to achieve similar results in Hyper-V.
37
-
38
-
## Solution 1: Using Enhanced Session Mode
39
-
40
-
Enhanced Session Mode enables interaction between the host and the VM, allowing USB devices to be redirected to the VM.
33
+
Enhanced Session Mode enables interaction between the host and the VM, allowing USB devices to be redirected to the VM. To use Enhanced Session Mode, follow these steps:
41
34
42
35
1. Open **Hyper-V Manager** on the host.
43
36
2. Select the Hyper-V host in the left-hand pane.
44
-
3. In the right-hand pane, click**Hyper-V Settings**.
37
+
3. In the right-hand pane, select**Hyper-V Settings**.
45
38
4. Under **Server**, ensure that **Enhanced Session Mode Policy** is enabled.
46
39
5. Under **User**, ensure that **Enhanced Session Mode** is enabled.
47
40
6. Start the VM you want to connect the YubiKey to.
48
41
7. Once the VM is running, open it in Enhanced Session Mode:
49
42
50
-
* Close the VM window if it is already open.
51
-
* Reconnect to the VM and select **Show Options**.
52
-
* Navigate to the **Local Resources** tab.
53
-
* Under **Local devices and resources**, click**More**.
54
-
* Expand the **Other supported Plug and Play (PnP) devices** section and select the YubiKey device.
55
-
* Click**OK** and reconnect to the VM.
43
+
1. Close the VM window if it's already open.
44
+
2. Reconnect to the VM and select **Show Options**.
45
+
3. Navigate to the **Local Resources** tab.
46
+
4. Under **Local devices and resources**, select**More**.
47
+
5. Expand the **Other supported Plug and Play (PnP) devices** section and select the YubiKey device.
48
+
6. Select**OK** and reconnect to the VM.
56
49
57
50
The YubiKey should now be accessible in the VM.
58
51
59
-
## Solution 2: Using Remote Desktop Protocol (RDP)
52
+
## Resolution 2: Use Remote Desktop Protocol (RDP)
60
53
61
-
RDP allows USB devices connected to the host to be redirected to the VM.
54
+
RDP allows USB devices connected to the host to be redirected to the VM. To use RDP, follow these steps:
62
55
63
56
1. Configure the VM to allow RDP connections:
64
57
65
-
* Log in to the VM and enable Remote Desktop in the system settings.
66
-
* Allow the necessary firewall rules for Remote Desktop.
58
+
1. Sign in to the VM and enable Remote Desktop in the system settings.
59
+
2. Allow the necessary firewall rules for Remote Desktop.
67
60
68
61
2. From the Hyper-V host, open the **Remote Desktop Connection** application.
69
-
3. In the RDP connection window, click**Show Options**.
62
+
3. In the RDP connection window, select**Show Options**.
70
63
4. Navigate to the **Local Resources** tab.
71
-
5. Under **Local devices and resources**, click**More**.
64
+
5. Under **Local devices and resources**, select**More**.
72
65
6. Expand the **Other supported Plug and Play (PnP) devices** section and select the YubiKey device.
73
-
7.Click**OK** and connect to the VM using RDP.
66
+
7.Select**OK** and connect to the VM using RDP.
74
67
75
68
Once connected via RDP, the YubiKey will be redirected and available in the VM.
76
69
77
-
## Determine the cause of the problem
78
-
79
-
If neither solution resolves the issue, consider the following:
70
+
If neither solution resolves the issue, consider the following items:
80
71
81
72
* Verify that the YubiKey is supported by the VM's operating system.
82
73
* Ensure that the USB device is functioning correctly on the host machine.
83
74
* Check for any additional configuration requirements specific to the YubiKey model.
84
75
85
-
By following the steps outlined in this article, you can enable the use of a YubiKey USB device in a Hyper-V virtual machine. For further assistance, consult the YubiKey documentation or contact Microsoft Support.
76
+
For further assistance, consult the YubiKey documentation or contact Microsoft Support.
0 commit comments