Proxmox Virtual Environment (Proxmox VE) is a powerful open-source virtualization platform based on KVM (Kernel-based Virtual Machine) and LXC (Linux Containers). One of the advanced features that enhances operational flexibility in Proxmox VE is hotplugging—the ability to dynamically add or remove hardware resources (like CPU, memory, and virtual devices) to a running VM without requiring a reboot.
In enterprise environments where uptime is critical, hotplug support allows administrators to optimize workloads on the fly. This article explores the hotplug capabilities of Proxmox VE, including supported devices, configurations, and practical tips for usage.
What is Hotplugging?
Hotplugging refers to adding or removing virtual hardware from a guest VM while it’s running. This enables real-time scaling and adaptation of VM resources based on workload demands, all without service interruption.
In Proxmox VE, hotplugging can be applied to:
- CPU (vCPU)
- Memory (RAM)
- Disks
- Network Interfaces (NICs)
- USB devices
- PCI(e) devices (with passthrough)
Enabling Hotplug in Proxmox VE
Hotplug is not enabled by default for all devices. To enable hotplugging:
1. Via Web GUI
- Go to your VM → Hardware tab.
- Click Options → Select Hotplug.
- Tick the boxes for the hardware components you want to enable hotplugging for (Disk, Network, CPU, Memory, USB).
- Click OK to save.
2. Via Command Line (CLI)
Modify the VM configuration file (located in /etc/pve/qemu-server/<vmid>.conf
) and add:
hotplug: disk,network,usb,memory,cpu
You can choose any combination depending on your needs.
Hotplug Support by Component
1. CPU Hotplug
- You can increase the number of vCPUs for a running VM.
- Requires a supported guest OS (modern Linux and Windows Server editions).
- Use with CPU topology awareness (
cores
,sockets
,threads
).
Some OSes require specific kernel modules or configurations to support CPU hot-add.
2. Memory Hotplug
- Memory can be added on the fly.
- Requires guest OS support.
- In Linux, the VM must have the
memory hotplug
feature enabled (e.g., kernel withCONFIG_MEMORY_HOTPLUG
). - In Windows, hot-add memory is supported in Datacenter and Enterprise editions.
❗ Memory hot-unplug is not supported by most OSes. Plan with ballooning or ZRAM if dynamic memory management is needed.
3. Disk Hotplug
- Add or remove virtual disks at runtime.
- Disks must be on hotpluggable buses (e.g., VirtIO SCSI or SATA).
- Useful for expanding storage or attaching new volumes dynamically.
qm set 101 --scsi1 local-lvm:vm-101-disk-1
Guest OS usually detects the new disk automatically.
4. Network Interface Hotplug
- Add virtual NICs to a running VM.
- New NICs show up immediately in the OS.
- Useful for network configuration testing or dynamic multi-NIC setups.
qm set 101 --net1 virtio=AA:BB:CC:DD:EE:FF,bridge=vmbr0
Linux will show it as a new interface like
eth1
orensX
.
5. USB Device Hotplug
- USB devices (real or emulated) can be passed through dynamically.
- Can be used for security keys, serial dongles, etc.
- Best effort support; passthrough stability depends on the host USB controller.
qm set 101 -usb0 host=046d:c534
6. PCI(e) Device Hotplug (Experimental)
- Supported through VFIO passthrough.
- Some modern hardware supports PCI hotplug, but with limitations.
- Ensure proper IOMMU and ACS isolation.
Guest OS Support for Hotplug
OS | CPU | Memory | Disk | NIC | Notes |
---|---|---|---|---|---|
Ubuntu (20.04+) | ✅ | ✅ (manual probe) | ✅ | ✅ | Requires acpi and udev rules |
CentOS/RHEL 7+ | ✅ | ✅ | ✅ | ✅ | May need modprobe acpi_memhotplug |
Windows Server 2016+ | ✅ | ✅ (Datacenter) | ✅ | ✅ | Reboot needed for some features |
Debian 10+ | ✅ | ✅ | ✅ | ✅ | Memory hot-add may need manual activation |
Best Practices
- Preconfigure max CPU/Memory
- Set a higher
max
value for CPU and Memory in the config, and use hotplug to scale up as needed.
- Set a higher
- Monitor guest behavior
- Some older guest OSes may not respond gracefully to hotplug actions.
- Backup before hot-add critical resources
- Unexpected behavior or crashes can occur on some configurations.
- Combine with Cloud-init or Ansible
- Automate VM resource expansion for DevOps and cloud scenarios.
Common Errors
- NUMA needs to be enabled for memory hotplug
- To enable memory hotplug you need to enable both NUMA (web UI: VM -> Hardware -> CPU) and Memory hotplug (web UI: VM -> Options -> Hotplug).
- Memory size (2240) must be aligned to 512 for hotplugging
- The memory size for hotplugging must be a multiple of 512.
- Minimum memory must be 1024MB
- You should assign a minimum of 1024 MB to the VM.
Limitations
- Not all guest OSes support hot-unplug (especially memory).
- Hotplugged memory may not be immediately usable without kernel or OS-level configuration.
- Over-relying on hotplug can lead to inconsistent VM states if not monitored properly.
- PCI passthrough hotplug is still experimental.
Conclusion
Hotplugging in Proxmox VE is a vital feature for businesses that demand agility, scalability, and minimal downtime. Whether you’re running high-availability clusters or dynamic test environments, hotplug enables you to allocate resources with precision and speed.
By understanding both the capabilities and limitations of hotplugging in Proxmox, administrators can plan VM deployments that are both responsive and resilient—helping teams stay productive without interruptions.