In the VMware Infrastructure Client (no vCenter), under the
Resources / Advanced CPU section of each VM's Edit Settings dialog, there is an option to alter the Scheduling Affinity of a VM. It sets the
sched.cpu.affinity value in the VMX file.
I believe this allows me to force a VM to only be serviced by a specific physical CPU on the host, judicious use of which might in some cases allow me to license a VM for one physical CPU rather than the two that are in the host.
The description of the config field in Edit Settings is as follows:
Hyperthreading Status: Active
Available CPUs: 12 (logical CPUs)
Select logical processor affinity for this virtual machine.
Use '-' for ranges and ',' to separate values. For example, "0,2-4,7" would indicate processors 0, 2, 3, 4 and 7.
Is it fair to assume (in this and similar cases):
- numbers 0 to 11 represent each of the physical cores (or are the 'hyperthreads' numbered too)?
- if I wanted to limit the VM to run on one of the physical CPUs, I should enter either
6-11(or are these numbers in some different pattern)?
Otherwise, is there a reliable source (VIC screen, shell command, etc.) to look up the number-to-CPU mapping on any particular host?
(For reference, the CPUs are Intel Xeon X5675 units, which are each 6-core with hyperthreading.)