When provisioning virtual machines in Windows 11 Hyper-V, administrators allocate virtual processors (vCPUs) to meet guest application workload requirements. By default, Hyper-V presents every allocated virtual processor as an individual, single-core CPU socket to the guest operating system. For example, if you assign 8 virtual processors to a virtual machine, the guest OS sees a computer with 8 physical processor sockets, each containing 1 single CPU core.
This default single-core socket topology creates serious compatibility and licensing problems. Client editions of Windows (such as Windows 10 Pro, Windows 11 Pro, or Enterprise) support a maximum of two physical CPU sockets regardless of the number of cores. If a virtual machine running Windows 11 Pro is assigned 8 vCPUs with default settings, the guest OS recognizes only the first 2 sockets (2 vCPUs) and completely ignores the remaining 6 processors. Furthermore, enterprise software such as Microsoft SQL Server or Oracle licenses per-socket, making socket topology management essential. Using PowerShell, administrators can configure CoresPerSocket to present multi-core virtual sockets to guest systems.
Understanding Hyper-V Virtual CPU Topology
Hyper-V manages virtual processor topology through three interrelated parameters on the VMProcessor object:
- Count: The total number of virtual processors allocated to the virtual machine.
- CoresPerSocket: The number of virtual cores grouped into each virtual CPU socket presented to the guest OS.
- SocketCount: The resulting number of virtual sockets (calculated automatically as
Count / CoresPerSocket). - HwThreadsPerCore: Dictates whether simultaneous multithreading (SMT/Hyper-Threading) is exposed per virtual core.
To avoid operating system socket limits while allocating 8 vCPUs, configure CoresPerSocket to 4. The guest OS then recognizes 2 physical sockets with 4 cores each, unlocking 100% of the allocated compute power.
Checking Current Virtual Machine CPU Topology
Launch PowerShell with administrative privileges on Windows 11 and inspect the processor configuration of a target virtual machine (such as “DevWorkstation”):
Get-VMProcessor -VMName "DevWorkstation" | Select-Object VMName, Count, CoresPerSocket, SocketCount
In default virtual machine deployments, CoresPerSocket is set to 1, and SocketCount equals Count:
VMName Count CoresPerSocket SocketCount
------ ----- -------------- -----------
DevWorkstation 8 1 8
If “DevWorkstation” runs Windows 11 Pro, the guest Task Manager will only display 2 active CPUs, wasting 75% of assigned host resources.
Shutting Down the Virtual Machine Before Modifying Topology
Modifying CPU socket topology requires the target virtual machine to be powered off. Verify the current power state and shut it down cleanly:
Get-VM -Name "DevWorkstation" | Select-Object Name, State
Stop-VM -Name "DevWorkstation"
Configuring CoresPerSocket via PowerShell
To assign 8 virtual processors mapped into 2 virtual sockets with 4 cores each, execute Set-VMProcessor:
Set-VMProcessor -VMName "DevWorkstation" -Count 8 -CoresPerSocket 4
Note: Count must be evenly divisible by CoresPerSocket. Passing an uneven value (e.g. 8 vCPUs with 3 cores per socket) will return an invalid parameter exception.
Confirm the new topology configuration:
Get-VMProcessor -VMName "DevWorkstation" | Select-Object VMName, Count, CoresPerSocket, SocketCount
The output confirms the desired layout:
VMName Count CoresPerSocket SocketCount
------ ----- -------------- -----------
DevWorkstation 8 4 2
Exposing SMT Hardware Threads (Hyper-Threading)
On modern multi-threaded guest workloads, you can also expose two hardware threads per virtual core by setting -HwThreadsPerCore:
Set-VMProcessor -VMName "DevWorkstation" -Count 8 -CoresPerSocket 4 -HwThreadsPerCore 2
This structure presents 2 sockets, with 2 physical cores per socket, and 2 hardware threads per core, accurately mimicking modern desktop CPU architectures.
Starting the Virtual Machine and Verifying in the Guest OS
Start the virtual machine using PowerShell:
Start-VM -Name "DevWorkstation"
Log in to the guest operating system and verify that all virtual processors are recognized:
Verifying in Windows Guests
- Open Task Manager inside the guest and navigate to the Performance tab.
- Select CPU. Under the graph, verify:
- Sockets:
2 - Cores:
8(or 4 physical cores with 8 logical processors) - Logical processors:
8
- Sockets:
- Confirm that all 8 processor graphs show active utilization under workload.
Verifying in Linux Guests (Ubuntu / Debian / RHEL)
In a Linux guest terminal, run lscpu:
lscpu | grep -E "CPU\(s\):|Thread\(s\) per core:|Core\(s\) per socket:|Socket\(s\):"
The command confirms that the kernel detects 2 sockets with 4 cores per socket.
Auditing Processor Topologies Across All Virtual Machines
To ensure that all virtual machines hosted on your Windows 11 system conform to operating system socket licensing limits, run an automated inventory report:
Get-VM | Get-VMProcessor | Select-Object VMName, Count, CoresPerSocket, SocketCount | Sort-Object SocketCount -Descending | Format-Table -AutoSize
Any virtual machine showing a SocketCount greater than 2 running a Windows client edition should be rescheduled for reconfiguration.
By effectively configuring CoresPerSocket in PowerShell, systems administrators eliminate OS licensing bottlenecks, unlock full multi-core performance, and ensure compliant virtual processor presentation in Windows 11 Hyper-V.