Change template on running VM

Kind day. I created several virtual machines, but forgot to enable parameters that allow me to increase memory and the number of processors on the fly. If I update the configuration via the command line(onevm update <mv_id>), the User Template field appears and the settings change slider becomes active, but when I try to change the parameters (increasing RAM), an error appears:

Blockquote

User template

HOT_RESIZE = [
CPU_HOT_ADD_ENABLED = “YES”,
MEMORY_HOT_ADD_ENABLED = “YES” ]
INPUTS_ORDER = “”
MEMORY_MAX = “32768”
MEMORY_UNIT_COST = “MB”
SCHED_DS_REQUIREMENTS = “ID="100"”
VCPU_MAX = “16”

Blockquote

Blockquote Driver Error
Tue Dec 17 09:33:58 2024: RESIZE: ERROR: resize: Command “virsh --connect qemu:///system setmem 51e04821-685e-4644-b654-3f7f2d491aa9 4194304” failed: error: invalid argument: cannot set memory higher than max memory Error executing “virsh --connect qemu:///system setmem 51e04821-685e-4644-b654-3f7f2d491aa9 4194304”: error: invalid argument: cannot set memory higher than max memory

Blockquote

How can I change these settings on running virtual machines?

Hello @snap87, and welcome to this forum,

Modifying the template of a running VM is not possible, so I would suggest to check the documentation about it:

https://docs.opennebula.io/6.10/management_and_operations/vm_management/vm_instances.html
https://docs.opennebula.io/6.10/management_and_operations/references/template.html

Let me know if it’s this or you need more help on this matter.

Regards,

I read this: it states that the correct template must be created before the VM starts.
However, after enabling hot resize in the custom template, the menu for changing the necessary parameters became active and this gave some hope, but apparently still not

Hi @snap87,

I’m sorry, but perhaps I have not clarity on what’s the amount of memory you are trying to change (the error states that you cannot put more memory than the maximum already stated).

Aside that what attributes are you trying to change?. The menu on Sunstone is active, but it will depend on the template and the values you have entered. Please check that and include it here, in case the problem persists.

Regards,