OpenNebula / one-apps

Toolchain to build OpenNebula appliances
Apache License 2.0
12 stars 10 forks source link

Live VCPU resize does not enable the new cores inside the VM #24

Closed OpenNebulaSupport closed 6 months ago

OpenNebulaSupport commented 2 years ago

This is a follow-up to https://github.com/OpenNebula/one/issues/1660.

After a live VCPU resize the VCPU is added to the VM in an offline state and it is not functional inside the VM. A VM with a resize from 1 to 2 VCPU will have a portion of lscpu looking like this.

CPU(s):                  2
  On-line CPU(s) list:   0
  Off-line CPU(s) list:  1

In order to enable the online CPU

echo 1 > /sys/devices/system/cpu/cpuID/online

The lscpu will display afterwards

CPU(s):                  2
  On-line CPU(s) list:   0,1

The top and cat /proc/cpuinfo information should also now display information about the extra core.

This process needs to be automated by OpenNebula after a resize vmm_mad action is triggered.

dann1 commented 2 years ago

The updateconf triggers the prereconfigure and reconfigure actions from the virtualization drivers where the ISO is removed/re-inserted in the VM. Several things need to happen

rsmontero commented 8 months ago

Probably using the VM template is much simpler, there VCPU is already available.