In my OpenNebula 7.0.1, I have noticed that if a template has assigned 1 CPU and 4 VCPU, really it consums 4 CPUs, not just 1 CPU. Because of this behaviour, my server is 100% loaded when, really, it would be at 25% CPU use.
Could it be due to this value in all views?
cat /etc/one/fireedge/sunstone/views/user/vm-template-tab.yaml
[…]
# Features
features:
# True to hide the CPU setting in the dialogs
hide_cpu: true
# False to not scale the CPU.
# An integer value would be used as a multiplier as follows:
# CPU = cpu_factor * VCPU
# Set it to 1 to tie CPU and vCPU.
cpu_factor: 1
Finally, changin “cpu_factor” to “false” in /etc/one/fireedge/sunstone/views/user/vm-template-tab.yaml and /etc/one/fireedge/sunstone/views/cloud/vm-template-tab.yaml solved this behaviour.
However, I don’t understand the reason this parameter has, by default, valour “1”…
As for your questions. hide_cpu: true disables CPU field in FireEdge and limits user to specify vCPU only. Then a value for CPU attribute is calculated based on the cpu_factor value. Having it with default value (1) means CPU = 1 x vCPU. E.g. if the user specified vCPU=4 then CPU= 1 x 4 = 4. You should be able to see those values in Capacity section of Info tab of the VM in FireEdge and in the output of the onevm show <vm_Id> | grep -i cpu command as well as in VM XML file: