Adding CPU Cores to a VMWare Virtual Machine


I ran into an issue recently where Windows 7 would only let me run 2 CPU’s even though I configured the machine to 4. Researching this, I found out I could adjust the cores per CPU thus allowing me to use all 4 cores. Awesome! Here is a link to the KB Article;

Now for the important steps.

This new setting, which you can add to the virtual machine configuration (.vmx) file, lets you set the number of cores per virtual socket in the virtual machine.
To implement this feature in vSphere Client:
  1. Power off the virtual machine.
  2. Right-click on the virtual machine and click Edit Settings.
  3. Click Hardware and select CPUs.
  4. Choose the number of virtual processors.
  5. Click the Options tab.
  6. Click General, in the Advanced options section.
  7. Click Configuration Parameters.
  8. Click Add Row.
  9. Include cpuid.coresPerSocket in the Name column.
  10. Enter a value (try 2, 4, or 8) in the Value column.

If you are using this method to make a Windows 2003 machine have 4 CPU’s for example, you want the cpuid.coresPersocket set to 2 and that will allow you to bump the number of VCPU’s to 4.

Notes: Ensure that the number of vCPUs is divisible by the number of cpuid.coresPerSocket in the virtual machine. That is, when you divide the number of vCPUs by the number of cpuid.coresPerSocket , it must return an integer value. For example, if your virtual machine is created with 8 vCPUs, coresPerSocket can only be 1, 2, 4, or 8.