Overview
Live vCPU/RAM scaling allows users to adjust compute resources on running instances without downtime. As an administrator, you configure which flavors support live scaling by setting hot-add extra specs that define the resource envelope.Xloud-Developed — Live vCPU/RAM Scaling is developed by Xloud and ships with XAVS / XPCI.
Prerequisites
- Admin credentials sourced from
admin-openrc.sh - Understanding of flavor extra specs and NUMA topology
Key Capabilities
Bidirectional CPU Scaling
Add and remove vCPUs on a running instance. Xloud is the only enterprise cloud platform that supports vCPU hot-remove through the management UI — other platforms support add-only.
Three Memory Methods
Balloon — fast cooperative resize within existing ceiling. DIMM Hotplug — 256 MB-aligned persistent modules. virtio-mem — 4 MB granularity with bidirectional add/remove support.
CPU Topology Awareness
Automatic thread alignment for SMT (hyperthreading) hosts. Five-method detection cascade ensures correct topology mapping across all CPU generations.
Configure a Live-Scalable Flavor
Before users can live-scale instances, you must create flavors with hot-add extra specs that define the min/max resource envelope.- Dashboard
- CLI
Create or edit a flavor
Click Create Flavor (or select an existing flavor and click Update Metadata).Set the base resources — these are the starting values when an instance is launched:
| Field | Example | Description |
|---|---|---|
| Name | m1.large-scalable | Descriptive name indicating live scaling is enabled |
| vCPUs | 4 | Starting vCPU count |
| RAM (MB) | 8192 | Starting RAM in MB |
| Root Disk (GB) | 80 | Root disk (unchanged by live scaling) |
Add hot-add extra specs
In the flavor’s Extra Specs panel, add the following keys:
| Key | Example Value | Description |
|---|---|---|
hw:cpu_max_sockets | 16 | Maximum CPU sockets (sets vCPU ceiling) |
hw:cpu_max_cores | 1 | Cores per socket (keep at 1 unless using NUMA) |
hw:cpu_max_threads | 1 | Threads per core |
hw:mem_max_mb | 65536 | Maximum RAM in MB (64 GB ceiling) |
hw:mem_page_size | any | Set to any or large for memory balloon resizing |
Resource Bounds Reference
The allowed range for live scaling is determined by the flavor’s base values and hot-add extra specs:| Resource | Minimum | Maximum | Configured By |
|---|---|---|---|
| vCPUs | Flavor base vCPU count | hw:cpu_max_sockets x hw:cpu_max_cores x hw:cpu_max_threads | Flavor extra specs |
| RAM | Flavor base RAM (MB) | hw:mem_max_mb | Flavor extra spec |
The minimum is the base flavor value — users cannot scale below the flavor’s original allocation via live scaling. To permanently reduce resources below the base, use a standard flavor resize (requires reboot).
API Reference
Live scaling is available via the Xloud Compute API extension:Adjust vCPU and RAM on a running instance
| Field | Type | Description |
|---|---|---|
current_vcpus | integer | New desired vCPU count (within flavor envelope) |
current_memory_mb | integer | New desired RAM in MB (within flavor envelope) |
Get current live resource state
NUMA Considerations
When an instance has a NUMA topology defined (viahw:numa_nodes), vCPU changes must keep each NUMA node balanced:
- A 2-NUMA-node instance with 4 vCPUs has 2 vCPUs per node
- Scaling to 6 vCPUs is valid (3 per node); scaling to 5 vCPUs is not (uneven split)
- Scaling to 8 vCPUs is valid (4 per node)
Check NUMA topology of a flavor
Troubleshooting
Live vCPU/RAM button not visible for users
Live vCPU/RAM button not visible for users
Scaling request rejected — value out of range
Scaling request rejected — value out of range
Cause: The requested vCPU or RAM value exceeds the flavor’s configured maximum.Fix: Either adjust the requested value, or update the flavor’s max specs:
Increase vCPU ceiling to 32
vCPU change rejected due to NUMA topology
vCPU change rejected due to NUMA topology
Cause: The requested vCPU count cannot be evenly distributed across the instance’s NUMA nodes.Fix: Choose a vCPU count that divides evenly across NUMA nodes. For a 2-NUMA instance: use 2, 4, 6, 8, 10…
Guest OS does not show new vCPUs after scaling up
Guest OS does not show new vCPUs after scaling up
Cause: Older Linux kernels (before 4.15) require manual CPU onlining.Fix: Run inside the guest:
Bring all hotplugged CPUs online
Memory scaling appears to have no effect
Memory scaling appears to have no effect
Cause: The guest OS memory balloon driver (For persistence, add
virtio_balloon) may not be loaded.Fix: Verify and load:Check and load balloon driver
virtio_balloon to /etc/modules.CPU pinned instances cannot be live-scaled
CPU pinned instances cannot be live-scaled
Cause: Instances with
hw:cpu_policy=dedicated (CPU pinning) do not support live vCPU scaling — this is by design to prevent pinning conflicts.Fix: Use hw:cpu_policy=shared (default) for instances that need live scaling. CPU-pinned instances must use standard flavor resize instead.Next Steps
User Guide: Live Scaling
End-user guide for scaling vCPU and RAM from the Dashboard
Flavor Management
Create and manage flavors with extra specs
Advanced Features
CPU pinning, NUMA, huge pages, vTPM, and GPU passthrough
Compute Admin Guide
Return to the Compute Administration Guide index