You can configure a virtual machine that runs on an ESXi host to have up to 128 virtual CPUs. You can change the number of virtual CPUs while the virtual machine is running or powered off.

Before you begin

  • If CPU hot add is not enabled, power off the virtual machine before adding CPUs.

  • If CPU hot remove is not enabled, power off the virtual machine before removing CPUs.

  • To hot add multicore CPUs, verify that the virtual machine has hardware version 8.

  • Required privilege: Virtual Machine > Configuration > Change CPU Count on the virtual machine

About this task

Virtual CPU hot add is supported for virtual machines with multicore CPU support that are running on hardware version 8 or later. When the virtual machine is powered on, and CPU hot add is enabled, you can hot add virtual CPUs to the running virtual machine. You can add only multiples of the number of cores per socket. For multicore CPUs, the host must have a license for vSphere Virtual Symmetric Multiprocessing (Virtual SMP).

Important:

When you configure your virtual machine for multicore virtual CPU settings, you must ensure that your configuration complies with the requirements of the guest operating system EULA.

Procedure

  1. In the vSphere Client inventory, right-click the virtual machine and select Edit Settings.
  2. Click the Hardware tab and select CPUs.
  3. Select a value from the Number of virtual sockets drop-down menu.
  4. Select a value from the Number of cores per socket drop-down menu.

    The resulting total number of cores is a number equal to or less than the number of logical CPUs on the host.

  5. Click OK to save your changes.

Adding Multicore CPU Resources to a Virtual Machine

You might have the following existing CPU resources, which you configured for the virtual machine while you were creating it, or after you created it and it was in a powered off state.

CPU Resource Settings

Existing Value

Number of virtual sockets

2

Number of cores per socket

2

Total number of cores

4

With CPU hot plug enabled and the virtual machine running, you can select the number of sockets to add from the Number of virtual sockets drop-down menu. The Number of cores per socket drop-down menu is unavailable and retains a value of 2. If you select 3 virtual sockets, you are adding 1 socket with 2 cores so that the virtual machine has 6 virtual CPUs.

CPU Resource Settings

Existing Value

Hot-plug value

Number of virtual sockets

2

3

Number of cores per socket

2

2

Total Number of cores

4

6