Add/Remove CPU and/or Memory resources to a live system

Memory and CPU are hot-pluggable on supported guest VMs running on AHV while the VM is powered on. 

Perform the following procedure to hot plug the memory AHV VMs:

acli vm.update <vm_name> memory=<new_memory_size>

Replace vm_name with the name of the VM and new_memory_size with the memory size.

And to hot plug CPU:

acli vm.update <vm_name> num_vcpus=<n>

Replace vm_name with the name of the VM and n with the number of CPUs.

Note:

  • Cores per socket can only be changed when VM is powered off
  • You cannot do vCPU and memory together

If Resources Remain Offline…

Identify offline memory:

# grep line /sys/devices/system/memory/*/state

Online the memory:

# echo online > /sys/devices/system/memory/memoryXXX/state

Identify offline CPU:

# cat /sys/devices/system/cpu/*/online

Online each CPU:

# echo 1 > /sys/devices/system/cpu/cpu<n>/online

Note: These options are for Linux system only. If hot-plugged memory and/or CPU remain offline on Windows systems, perform a reboot!

Leave a Reply

Your email address will not be published. Required fields are marked *