Pcornel
Virtualization · VM Hardware › vCPU

CPU Hot Add

Cheat sheet · https://pcornel.dk/topic.php?topic=3454

Back to the Topic

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

BoundaryMeaningEvidence limit
Feature enabledVM permits CPU hot-addPrerequisite only
Runtime addHypervisor changes VM CPU setNot guest proof
Guest onlineOS recognizes processorNot workload scaling
ApplicationUses new parallelismMust 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

Confirmation

Confirm action

Continue?