This is an odd one. I’m currently running a PoC with OpenNebula 6.4 and HCI, using KVM.
When I provision a KVM VM using a marketplace template (i’ve tried CentOS 7 and Debian 10, same on both) I get strange behaviour with the “hot resize” ram option enabled.
Upon instantiating a VM, it starts with the max memory (so 128GB in my case) and rapidly decreases until it hits zero and the VM crashes because it has no RAM left. I have sensible defaults for my VM and host settings (max memory etc) and with the hot resize option disabled, this behaviour does not occur.
Rebooting the VM puts me back at square 1 with max RAM, and the problem starts all over again.
Relevant extract from VM config:
HOT_RESIZE = [
CPU_HOT_ADD_ENABLED = "YES",
MEMORY_HOT_ADD_ENABLED = "YES" ]
HYPERVISOR = "kvm"
INPUTS_ORDER = ""
LOGO = "images/logos/debian.png"
LXD_SECURITY_PRIVILEGED = "true"
MEMORY_UNIT_COST = "MB"
USER_INPUTS = [
MEMORY = "M|range||1024..128000|768" ]
...
MEMORY = "1024"
MEMORY_MAX = "131072"
Output of free -g
whilst this is happening:
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 24 0 23 0 0 23
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 22 0 22 0 0 21
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 21 0 21 0 0 20
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 20 0 20 0 0 19
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 19 0 19 0 0 18
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 18 0 17 0 0 17
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 16 0 16 0 0 15
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 15 0 15 0 0 14
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 14 0 13 0 0 13
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 12 0 12 0 0 11
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 11 0 11 0 0 10
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 10 0 10 0 0 9
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 9 0 8 0 0 8
Swap: 0 0 0
root@localhost:~# free -g
total used free shared buff/cache available
Mem: 7 0 7 0 0 6
Swap: 0 0 0
root@localhost:~# free -g
Connection to x.x.x.x closed by remote host.
Connection to x.x.x.x closed.