[VirtualMachineResize] host 0 does not have enough capacity

Hi All,

A user is hitting this error when resizing a VM, infact they are reducing the resource - not increasing.

So i’ve changed the RESERVED_CPU and RESERVED_MEM to be regative values.

If I interpret the below settings correctly, CPU can be 100% overcommitted, memory 50GB overcommitted. This is a fairly big environment so over committing is going to be necessary.

RESERVED_CPU -100
RESERVED_MEM -52428800

Currently the Allocated CPU is 7700 / 5900 (131%)

The issue I can still reproduce the resize error with my testing account. I can resize the VM using my oneadmin group account.

Have I used the RESERVED values incorrectly?

Any advice is helpful. Thanks.

*Note i’ve set the same on the Cluster as well just in case without any effect.

CPU values are not percentages but CPU units. One CPU is 100 units. To double the amount of CPU in a 58 core machine you should set:

RESERVED_CPU=-5800

oneadmin users are able to resize because by default administrator actions do not check resource limits.

Thanks for the response, that fixed it!

I had tried some large negative numbers just in case - but not that large.

I was expecting a percentage - so perhaps the documentation below is incorrect?

http://docs.opennebula.org/4.12/administration/references/schg.html

The wording is not correct. When it says percentage refers to the units. 1 CPU = 100 units.