Saturday, August 27, 2011

Setting the number of cores per CPU in a virtual machine

  • Power off the virtual machine.
  • Right-click on the virtual machine and click Edit Settings.
  • Click Hardware and select CPUs.
  • Choose the number of virtual processors.
  • Click the Options tab.
  • Click General, in the Advanced options section.
  • Click Configuration Parameters.
  • Include cpuid.coresPerSocket in the Name column.
  • Enter a value (try 2, 4, or 8) in the Value column.
Note: 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.
The virtual machine now appears to the operating system as having multi-core CPUs with the number of cores per CPU given by the value that you provided in step 9.
  • Click OK.
  • Power on the virtual machine.
For example:
Create an 8 vCPU virtual machine and set cpuid.coresPerSocket = 2. Window Server 2003 SE running in this virtual machine now uses all 8 vCPUs. Under the covers, Windows sees 4 dual-core CPUs. The virtual machine is actually running on 8 physical cores.
Only values of 1, 2, 4, 8 for the cpuid.coresPerSocket are supported for the multi-core vCPU feature in ESX 4.x.
In ESX 4.0, if multi-core vCPU is used, hot-plug vCPU is not permitted, even if it is available in the UI.
Only Hardware Version 7 virtual machines support the multi-core vCPU feature.

For more information read this article from VMware
Also read the article Use Coreinfo to view VM core and socket count

No comments:

Post a Comment