Variations on this question are asked fairly often, but I'd like to get further clarification for my scenario.
I have an ESXi 5.1 test server with a single i7-3720QM processor, with 4 cores, and 8 logical processors.
Considering only two (2) Windows Server VM's will ever run full time on this server, how many total CPU cores should I assign to each for MAXIMUM performance? 2, 4, or 8?
Depends.
Do you need to guarentee that both VMs get a fair share and / or don't impact each other?
I'd say that is generally true. However, even though both need to be powered on at the same time, they aren't used at the same time. Also, this ESXi server also periodically runs other test VM's, but only for limited amounts of time.
In that case, provide no more than 4 vCPUs in total to all VMs combined.
So, 2 per VM, in your case.
Can you elaborate?
You have 4 real cores (HT cores dont count) to give out.
You need to guarentee that 2 VMs have guarenteed levels of performance, even when running together. Therefore, you cannot overcommit.
Therefore, you can allocate no more than the 4 cores you have. 2 VMs x 2 vCPUs per VM = 4 cores allocated.