When migrating virtual machines (VMs) to Azure, some users have reported seeing only half of the expected vCPUs in Task Manager, despite the hardware and device manager showing the correct number of CPUs. This article explains the root cause of the issue and provides a step-by-step solution that has been successfully implemented.
Issue Overview
After migrating a VM with the D4s v4 size, which is supposed to have 4 vCPUs, users observed the following:
- Device Manager correctly shows 4 CPUs.

- Task Manager displays only 2 Virtual Processors.

- PowerShell (
Get-ComputerInfo
) reports only 2 CPUs.

This discrepancy can lead to performance concerns, as the VM appears to be underutilizing its allocated resources.
Root Cause
The issue is typically caused by Hyperthreading being disabled. When Hyperthreading is turned off, the VM uses physical cores instead of virtual cores, resulting in only half of the expected vCPUs being displayed in Task Manager.
Solution
To resolve the issue, modifications to the Windows Registry are required, followed by a reboot of the VM from the Azure portal or via the command line. Note: Rebooting from within the Guest OS is not sufficient for the changes to take effect.
Steps to Fix the Issue
- Modify the Registry Keys
Run the following commands in an elevated Command Prompt or PowerShell session:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverride /t REG_DWORD /d 72 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management" /v FeatureSettingsOverrideMask /t REG_DWORD /d 3 /f
- Reboot the VM
Perform the reboot from the Azure portal or using the Azure CLI. For example:
az vm restart --name <VM_NAME> --resource-group <RESOURCE_GROUP>
- Important: Rebooting the VM from within the Guest OS (e.g., via the Start menu) will not apply the changes.
Verification
After completing the above steps:
- Open Task Manager and verify that the correct number of vCPUs is displayed.
- Use PowerShell to confirm the CPU count:
(Get-ComputerInfo).CsProcessors
The issue should now be resolved, and the VM will utilize its full allocated resources.
Additional Notes
- This solution was successfully tested and implemented by the Azure support team.
- If Hyperthreading was intentionally disabled for specific workloads, consult with your team before applying this solution.
Conclusion
This registry modification resolves the issue where only half of the vCPUs are displayed in Task Manager for Azure VMs. Ensuring proper configuration and rebooting the VM from the Azure portal is critical for the fix to take effect. By following these steps, users can fully utilize their allocated VM resources and avoid performance bottlenecks.