Why is VM RAM size different on UI and backend?
Up to OnApp 3.4
Some RAM is always reserved by the kernel. You can see how much / when it is reserved by checking dmesg and other boot logs.
In many cases, the amount of reserved RAM is larger than expected. Usually this means that the VM in question is built from a template that allows resize without reboot. If you disable "allow resize without reboot" for the template, then whenever OnApp boots the VM, it will boot it with maxmem=assignedmem instead of maxmem=16*assignedmem and the amount of reserved RAM will be smaller. This change is done through the database with a command similar to:
mysql> update virtual_machines set allow_resize_without_reboot =0 where identifier ="xxxxxxxx" limit 1;
where the identifier is the virtual_machine identifier.
Please be aware that disabling resize without reboot does mean that when resizing the RAM or CPU of the VM, it will require a reboot.
One other thing that affects the RAM, is having the ' allow_resize_without_reboot' option enabled for the template. If you would like future VMs to have this disabled, you will need to run this command:
update templates set allow_resize_without_reboot=0 where id=xxx limit 1;
where id is the template ID.