Do Hyper-V guests see multiple CPUs (sockets) or multiple CPU cores when assigned more than 1 vCPU?

I have SQL Server 2008 Express running on Hyper-V based virtual machine with two vCPU-s. I've just been reading up on SQL Server 2012 Express and noticed that it's CPU is "Limited to lesser of 1 Socket or 4 cores" (http://msdn.microsoft.com/en-us/library/cc645993(v=SQL.110).aspx)

My question is how do the SQL Server 2012 limits on CPUs/Cores translate into vCPU-s? Are they "processors" or are they "cores"?

EDIT:

I've just found this: Are vCPU the same as 1 Socket, or a single Core?

Basically the solution is download CPU-Z and check, which I did. On my 2 x vCPU VPS the CPUZ is showing 1 core 2 thread so it sounds like my SQL Express should fly on both vCPUs. However when I go into processor affinity configuration it shows 2 processors there making it appear that it is using just one of the vCPUs allocated to my VPS. I am utterly confused :/


Each vCPU counts as a single CPU from within the guest OS, which means that guest OSes and the applications inside them, each physical core is a single CPU.

Virtualization abstracts the physical hardware, so all the guest OS and any application inside it can see are the values the hypervisor passes to them. In your case, the hypervisor tells the OS you have two CPUs because that's how you set it up - to have two virtual CPUs. So when SQL goes to look at how many CPUs you have, SQL sees the two [virtual] CPUs you assigned, so SQL Express limits itself to using one.

I guess I should add this: A quick and dirty on how to configure vCPUs in Hyper-V. If you want SQL Express to use more CPU resources, put in one vCPU and map it to more physical processors and/or a higher resource limit. That will allow SQL Express to use as much of the CPU resources the host can allocated to it, without bumping into the CPU licensing limitation of SQL Express.

Oh, but don't do this on your existing OS, as changing the number of processors between single and multiple CPUs in a Windows OS leads to trouble - it makes the OS unstable. Create a new VM, with a new OS install, and this time just create one vCPU, which you can map to more physical resources.


Hyper-V in Server 2008 and Server 2008 R2 projects a virtual topology to the VM that looks like a single CPU with multiple cores. If you want to see this for yourself, download Coreinfo from Sysinternals. (Currently at http://technet.microsoft.com/en-us/sysinternals/cc835722)

Hyper-V in Server 2012 can project many different sorts of virtual topologies, which is useful for configuring workloads with lots of virtual processors. It will default to projecting topologies which match the physical topology, but you can override that.

Note that changing the topology projected into your VM can change the performance of the workload within, by causing the guest OS and application stack to make different configuration decisions. Merely changing the guest topology, though, can't bring you into licensing compliance.