Virtualization · VM Hardware › vCPU
CPU Hot Add
Cheat sheet · https://pcornel.dk/topic.php?topic=3454
Answer
Hot-adding CPU changes guest-visible processor resources without a full VM power cycle when the platform and guest support online CPU addition.
Remember
- Hypervisor acceptance of a hot-add request does not guarantee guest online/usage.
- Guest OS editions/versions and topology rules can limit hot-add support.
- Hot add usually increases count; removing CPUs online is a separate capability and may not be supported.
- Application scaling after CPU addition is not automatic.
First checks
qm set <vmid> --hotplug cpu,memory— enable hotplug (Proxmox)virsh setvcpus <vm> 4 --live— add vCPUs live (libvirt)Get-VMProcessor <vm>— Hyper-V (no vCPU hot add)
Verify in this order
hotplug enabled → vCPU added → guest onlines CPU
Where it usually breaks
First mismatch in host capability/IOMMU/NUMA → hypervisor allocation/mapping → virtual hardware model → guest driver/enumeration → workload use; preserve identity/native error/pre-state before mutation.
VM Hardware → vCPU → CPU Hot Add reference map
| Boundary | Meaning | Evidence limit |
|---|---|---|
| Feature enabled | VM permits CPU hot-add | Prerequisite only |
| Runtime add | Hypervisor changes VM CPU set | Not guest proof |
| Guest online | OS recognizes processor | Not workload scaling |
| Application | Uses new parallelism | Must be verified |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3454