Is it possible to increase vcpu on LIVE VM, when vcpu_max is lower than the increasing number?

OpenNebula: 6.2

Steps to reproduce:

  • Increase / resize vcpu on sunstone gui

Current results:

Mon Jun 6 19:02:56 2022 [Z0][VMM][E]: RESIZE: ERROR: resize: Command “virsh --connect qemu:///system setvcpus xxxx 6 --live --hotpluggable” failed: error: invalid argument: requested vcpus is greater than max allowable vcpus for the live domain: 6 > 4 Failed to resize VCPU to 6

Expected results:

The result is as expected, because max_vcup is not set 6 (or greater).

The question here: do i need to:

  1. update the template accordingly
  2. shutdown/power off the vm
  3. increase max_vcpu
  4. reinitiate the template

or is there any way to do this without doing above steps?

Thx & best Regards
Mike

You need to power off the VM in order to re-create the libvirt template with the update max VCPU value. You can basically

  1. power off the VM
  2. edit the instance template with onedb increasing the values in the editor
  3. resume the VM

Thx Daniel … yes, also thought to that …

with step 2 i think you mean:

onedb update-body <action" --id vmid