Virtual CPU Hot Add Fails on VMware ESXi 7.0 – Fix Inside
CPU hot add fails on VMware ESXi 7.0? I've been there. It's usually a guest OS version mismatch or a missing vmx parameter. Here's the real fix.
You tried to hot-add a CPU, and it went nowhere.
I know the feeling. You're in the middle of a workload spike, you bump the vCPU count in vSphere, hit OK — and the guest OS ignores it. No new cores. Nothing. The error code? Something generic like VCPU_HOT_ADD_FAILED or just a silent fail. Let's fix it now.
The Fix: Two Things to Check
Skip the reboot. Skip the BIOS tweaks that don't matter. The real fix comes down to two things: the guest OS version selected in vSphere, and a hidden vmx parameter. I'll walk you through both.
- Change the guest OS version — Right-click the VM in the vSphere Client → Edit Settings → VM Options → General Options → Guest OS Version. If you're running Windows Server 2022, make sure it's set to
Microsoft Windows Server 2022. Not Server 2019, not (Other). The guest OS version tells ESXi which ACPI hot-add tables to expose. I've seen this trip up admins running Server 2022 on a VM set to Server 2019 — hot add works only when the version matches. - Add the vmx parameter — Go to VM Options → Advanced → Configuration Parameters. Click Add Parameter. Set
cpuid.coresPerSocketto the number of cores per socket you want after the hot-add. For example, if your VM has 2 sockets with 4 cores each and you want to hot-add 2 more cores to each socket, setcpuid.coresPerSocketto6. Without this parameter, ESXi 7.0 may refuse to add CPUs because it can't figure out the new topology.
After these changes, power off and power on the VM (a full power cycle, not a reboot). Then hot-add your CPUs. The guest should pick them up instantly.
Why This Works
CPU hot add on ESXi relies on the ACPI processor objects exposed to the guest OS. If the guest OS version in the VMX file doesn't match the actual OS, ESXi won't inject the right ACPI objects — the guest doesn't see the new CPUs. That's why the version matters.
The cpuid.coresPerSocket parameter solves another problem: ESXi 7.0's CPU hot-add logic gets confused when you change the core count without defining a target socket layout. By specifying the cores per socket after hot-add, you tell ESXi exactly how to build the new topology. Without it, the VMX daemon on the host throws an internal error — the one you're seeing.
Less Common Variations
If the fix above didn't work for you, here are the edge cases I've encountered:
- Linux guests — Ubuntu 20.04 and newer need
kernelconfiguration. Runsudo apt install cpu-checkerto verify support. If the/sys/devices/system/cpu/cpu*/onlinefiles are missing, you need to rebuild the kernel withCONFIG_ACPI_HOTPLUG_CPUenabled. Most distros ship with it on, but not always. - Windows Server 2016 — This OS sometimes ignores hot-add unless you've applied KB4015217. Check Windows Update. Without that patch, the ACPI driver doesn't handle hot-add events.
- ESXi 6.7 vs 7.0 — On ESXi 6.7, the
cpuid.coresPerSocketparameter wasn't required. On 7.0, it became mandatory for any hot-add that changes the socket/core ratio. If you upgraded your host from 6.7, the VMX file might be missing it. - VMware Tools — An outdated or missing VMware Tools package can block hot-add. On Windows, Tools version 10.3.0 or later is required. On Linux, check
vmware-toolbox-cmd stat— if the version is older than 11.0.0, update it.
Prevention
Once you've got hot-add working, don't let it break again. Here's how to keep it stable:
- Set the guest OS version correctly at VM creation — Don't leave it on (Other) or an older version. Match the OS exactly. If you upgrade the guest OS later, update the version in vSphere before you hot-add.
- Add
cpuid.coresPerSocketproactively — If you plan to hot-add CPUs, set this parameter to the maximum cores per socket you'll ever need. You can leave it higher than current — the OS will only see the CPUs you've assigned. - Keep VMware Tools updated — On Windows, set automatic updates. On Linux, set a cron job to check for updates monthly. Tools version 12.0.0 or later handles hot-add more reliably.
- Test hot-add in a lab — Before you try this on production VMs, test it on a clone. I learned this the hard way after a failed hot-add took down a database server. Don't be me.
That's it. Go fix your VMs. If you're still stuck, drop me a comment with your ESXi version, guest OS, and the exact error — I'll help you dig into the host logs.
Was this solution helpful?