You can configure a virtual machine that runs on an ESXi host to have up to 32 virtual CPUs. You can change the number of virtual CPUs while the virtual machine is running or powered off.
Virtual CPU hot add is supported for virtual machines with multicore CPU support and 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 only add multiples of the number of cores per socket. For multicore CPUs, the host must have a license for vSphere Virtual Symmetric Multiprocessing (Virtual SMP).