|
| 1 | +--- |
| 2 | +title: Hyper-V Virtual Machine Input, Migration, and Device Integration Issues |
| 3 | +description: Provides a comprehensive guide to troubleshoot common issues encountered with Hyper-V virtual machines (VMs). |
| 4 | +ms.date: 08/18/2025 |
| 5 | +manager: dcscontentpm |
| 6 | +audience: itpro |
| 7 | +ms.topic: troubleshooting |
| 8 | +ms.reviewer: kaushika, jeffhuge, v-lianna |
| 9 | +ms.custom: |
| 10 | +- sap:virtualization and hyper-v\integration components |
| 11 | +- pcy:WinComm Storage High Avail |
| 12 | +--- |
| 13 | +# Troubleshooting Hyper-V Virtual Machine Input, Migration, and Device Integration Issues |
| 14 | + |
| 15 | +This article provides a comprehensive guide to troubleshoot common issues encountered with Hyper-V virtual machines (VMs). It focuses on resolving problems related to device integration (such as mouse, keyboard, GPU, or USB), migration, and enhanced session mode. These issues may arise following platform upgrades, changes in cluster configurations, or migrations from other hypervisors, like VMware. Addressing these problems is critical to maintaining VM usability, ensuring network connectivity, and supporting business operations. |
| 16 | + |
| 17 | +## Symptoms |
| 18 | + |
| 19 | +### End-user symptoms |
| 20 | + |
| 21 | +- Mouse movements appear inverted vertically in Linux guest VMs after upgrading to Windows 11. |
| 22 | +- Mouse and keyboard become unresponsive in Windows 11 VMs when using Enhanced Session Mode. |
| 23 | +- Failure to perform live migration of VMs with Trusted Platform Module (TPM) enabled. |
| 24 | +- VMs assigned to VLANs lose network connectivity. |
| 25 | +- Inability to connect USB devices or GPU cards to VMs after migration from VMware. |
| 26 | +- VMs experience frequent, random reboots or unexpected connectivity loss to business applications. |
| 27 | + |
| 28 | +### Technical/system symptoms |
| 29 | + |
| 30 | +- **Error messages or Event IDs**: - “Failed to remove checkpoint. (Virtual machine ID …)” |
| 31 | + - “Virtual machine failed to generate VHD tree: Catastrophic failure (0x8000FFFF)” |
| 32 | + - “Cannot delete checkpoint: Catastrophic failure (0x8000FFFF)” |
| 33 | + - “The system cannot find the file specified.” |
| 34 | + - Event ID 1069 (Failover Clustering): Cluster resource failure. |
| 35 | + - Event ID 41 (Kernel-Power): System rebooted without a clean shutdown. |
| 36 | + - Event ID 18502 (Hyper-V-Worker): VM was turned off. |
| 37 | + - Event ID 3056 (Hyper-V-Worker): NUMA topology mismatch warning. |
| 38 | + - Event ID 1106 (Hyper-V VMMS): Access violation (c0000005) during live migration. |
| 39 | + - Reliability Monitor shows repeated SCVMM agent crashes. |
| 40 | +- Inability to uninstall VMware Tools after migration to Hyper-V. |
| 41 | +- VMs hang or become unresponsive, with high CPU usage by services like WMI or LSASS. |
| 42 | +- Hyper-V Manager displays orphaned checkpoints that block backups. |
| 43 | + |
| 44 | +## Cause |
| 45 | + |
| 46 | +### Input and device integration failures |
| 47 | + |
| 48 | +- **OS/Hypervisor compatibility**: Upgrading the host OS (for example, to Windows 11 24H2) may introduce changes in Hyper-V integration services, leading to input inversion or loss, especially in non-Windows guest VMs. |
| 49 | +- **Enhanced Session Mode**: Protocol or driver issues may disrupt input device functionality within Enhanced Session Mode on Windows 11 VMs. |
| 50 | +- **Migration from VMware**: Incomplete or incompatible removal of VMware Tools or differences in device passthrough (for example, USB or GPU) between VMware and Hyper-V may cause connectivity and performance problems. |
| 51 | + |
| 52 | +### Migration and cluster failures |
| 53 | + |
| 54 | +- **TPM/shielded VM certificate misconfiguration**: Missing or improperly transferred shielding certificates can prevent live migration for TPM-enabled VMs. |
| 55 | +- **VLAN/network configuration**: Physical switch port misconfigurations or legacy network teaming setups may isolate VMs after VLAN assignment. |
| 56 | +- **VM configuration version**: Outdated VM configuration versions may be incompatible with newer Hyper-V hosts, leading to migration failures. |
| 57 | +- **Heartbeat integration**: High CPU usage, resource exhaustion, or application hangs within VMs may trigger cluster heartbeat failures, resulting in forced restarts. |
| 58 | + |
| 59 | +### File system and storage issues |
| 60 | + |
| 61 | +- **Orphaned checkpoints**: Incomplete merge operations can leave behind phantom checkpoint files, blocking backups or checkpoint deletions. |
| 62 | +- **File system corruption**: Issues with storage or the file system may disrupt checkpoint removal or VHD chain updates. |
| 63 | + |
| 64 | +### Application-level and third-party integration |
| 65 | + |
| 66 | +- **Monitoring/agent crashes**: Third-party monitoring or agent software (such as SCVMM or Zenoss) may fail due to changes in Hyper-V or Windows Server. These failures often occur without a direct impact unless associated with failed operations. |
| 67 | + |
| 68 | +## Resolution |
| 69 | + |
| 70 | +### 1. Input and device integration issues |
| 71 | + |
| 72 | +#### A. Mouse/keyboard issues in guest VMs |
| 73 | + |
| 74 | +- For inverted mouse input in Linux guest VMs on Windows 11 24H2, revert the host OS to Windows 11 23H2 until a permanent fix is available. |
| 75 | +- To resolve Enhanced Session Mode input loss in Windows 11 VMs: 1. Open **Hyper-V Manager**. |
| 76 | + 2. Navigate to **Hyper-V Settings > Enhanced Session Mode Policy**. |
| 77 | + 3. Uncheck **Allow enhanced session mode** to disable the feature. |
| 78 | + 4. Test input functionality in standard session mode. |
| 79 | + |
| 80 | +#### B. USB/GPU passthrough after VMware migration |
| 81 | + |
| 82 | +- **USB devices**: - Use Remote Desktop USB redirection or Enhanced Session Mode for supported OSs. |
| 83 | + - Alternatively, configure a network USB solution as Hyper-V does not natively support direct USB passthrough. |
| 84 | +- **GPU assignment**: Use Discrete Device Assignment (DDA): - Follow guidance from [Deploying graphics devices using DDA](https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/deploy/deploying-graphics-devices-using-dda#configure-the-vm-for-dda). |
| 85 | + - Confirm hardware, drivers, and VM configuration support for DDA. |
| 86 | + |
| 87 | +#### C. Uninstalling VMware Tools |
| 88 | + |
| 89 | +- Use PowerShell scripts, like Uninstall-VMwareTools.ps1 from GitHub, to forcibly remove VMware Tools and associated services after migration. |
| 90 | + |
| 91 | +### 2. Migration and cluster issues |
| 92 | + |
| 93 | +#### A. TPM/shielded VM migration failures |
| 94 | + |
| 95 | +1. On the source node, list Shielded VM certificates:bashcertutil -store "Shielded VM Local Certificates" |
| 96 | +2. Export encryption and signing certificates: |
| 97 | + |
| 98 | + ```plaintext |
| 99 | + certutil -exportPFX -p <password> "Shielded VM Local Certificates" <SerialNumber> c:\cert-VMEncryption.pfx |
| 100 | + certutil -exportPFX -p <password> "Shielded VM Local Certificates" <SerialNumber> c:\cert-VMSigning.pfx |
| 101 | + ``` |
| 102 | +3. Import certificates on the target node:```bashcertutil -importPFX "Shielded VM Local Certificates" c:\cert-VMEncryption.pfxcertutil -importPFX "Shielded VM Local Certificates" c:\cert-VMSigning.pfx |
| 103 | +
|
| 104 | +#### B. VLAN/network connectivity |
| 105 | +
|
| 106 | +- Configure physical switch ports as trunk ports to allow all VLANs. |
| 107 | +- Replace legacy LBFO (Load Balancing and Failover) teams with Switch Embedded Teaming (SET) for physical NICs. |
| 108 | +- Assign VLAN IDs and verify connectivity for each physical interface. |
| 109 | +
|
| 110 | +#### C. VM configuration version |
| 111 | +
|
| 112 | +- Update the VM configuration: |
| 113 | +
|
| 114 | + ```plaintext |
| 115 | + Update-VMVersion -Name <VMName> |
| 116 | + ``` |
| 117 | +- After updating, test live migration. If issues persist, shut down the VM, perform a quick migration, and then restart. |
| 118 | +
|
| 119 | +#### D. Cluster/heartbeat-related reboots |
| 120 | +
|
| 121 | +- If VMs are rebooted due to heartbeat failures: 1. Disable the Heartbeat Integration Service for affected VMs: - Go to **VM settings > Integration Services**. |
| 122 | + - Uncheck **Heartbeat**. |
| 123 | + 2. Monitor VM stability. If high CPU usage (for example, by WMI or LSASS) is detected, investigate resource usage. |
| 124 | + 3. Collect memory dumps for analysis:```bashDebug-VM -Name -InjectNonMaskableInterrupt -Force |
| 125 | +
|
| 126 | +### 3. File system, storage, and checkpoint failures |
| 127 | +
|
| 128 | +#### A. Orphaned/phantom checkpoints |
| 129 | +
|
| 130 | +1. Create a new checkpoint for the affected VM. |
| 131 | +2. Export the latest checkpoint to a safe location. |
| 132 | +3. Delete the VM from Hyper-V Manager. |
| 133 | +4. Import the VM back into Hyper-V using the restore option. For clusters, remove the VM from the cluster, recreate it with the same configuration, attach the existing VHD/VHDX, and add it back to the cluster. |
| 134 | +5. Inspect checkpoints using PowerShell: |
| 135 | +
|
| 136 | + ```plaintext |
| 137 | + Get-VM -Name <VMName> | Get-VMSnapshot |
| 138 | + Get-VHDChain -Path <path-to-vhdx> |
| 139 | + ``` |
| 140 | +6. Use tools like Process Monitor (procmon) to trace file access and verify system integrity. |
| 141 | +
|
| 142 | +### 4. Application-level and third-party integration issues |
| 143 | +
|
| 144 | +- If monitoring or agent integration fails: - Verify WMI and WINRM configurations on hosts. |
| 145 | + - Review application logs for authentication errors, such as GSS challenge failures. |
| 146 | + - If Hyper-V and WMI are functional, escalate to the third-party vendor for further support. |
| 147 | +
|
| 148 | +### 5. General remediation and prevention |
| 149 | +
|
| 150 | +- Apply the latest Windows updates and cluster patches. |
| 151 | +- Regularly monitor storage infrastructure to prevent file system corruption. |
| 152 | +- Maintain up-to-date documentation of VM configurations, certificates, and network settings. |
| 153 | +- For security vulnerabilities, ensure correct revocation policies and registry settings:```bashSet-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\DeviceGuard" -Name EnableVirtualizationBasedSecurity -Value 0 -Type DWordRestart-Computer |
| 154 | +
|
| 155 | +## Data collection |
| 156 | +
|
| 157 | +To collect logs and information: |
| 158 | +- **Cluster and event logs**: Gather TSS logs, Performance Monitor data, and Event Viewer logs (Hyper-V-VMMS, Hyper-V-Worker, System, Application). |
| 159 | +- **VM configuration**: |
| 160 | +
|
| 161 | + ```plaintext |
| 162 | + Update-VMVersion -Name <VMName> |
| 163 | + ``` |
| 164 | +- **Snapshot/checkpoint inspection**: |
| 165 | +
|
| 166 | + ```plaintext |
| 167 | + Get-VM -Name <VMName> | Get-VMSnapshot |
| 168 | + Get-VHDChain -Path <path-to-vhdx> |
| 169 | + ``` |
| 170 | +- **Certificate management**: |
| 171 | +
|
| 172 | + ```plaintext |
| 173 | + certutil -store "Shielded VM Local Certificates" |
| 174 | + certutil -exportPFX ... |
| 175 | + certutil -importPFX ... |
| 176 | + ``` |
| 177 | +- **Memory dump collection**: |
| 178 | +
|
| 179 | + ```plaintext |
| 180 | + Debug-VM -Name <VMName> -InjectNonMaskableInterrupt -Force |
| 181 | + ``` |
| 182 | +- **Process/file system monitoring**: Use Process Monitor (procmon) to track errors. |
| 183 | +
|
| 184 | +## References |
| 185 | +
|
| 186 | +- [Deploying graphics devices using DDA](https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/deploy/deploying-graphics-devices-using-dda#configure-the-vm-for-dda) |
| 187 | +- Check Microsoft advisories for relevant updates and patches. |
0 commit comments