Created attachment 1026435 [details] vdsm and qemu log Checked on rhevm-3.5.3-0.2.el6ev.noarch Have host with: [root@alma05 ~]# free total used free shared buff/cache available Mem: 16151584 536368 14852488 41680 762728 15259472 Swap: 0 0 0 Try to run vm with memory=15000MB and guaranteed memory=1024MB under cluster Memory Optimization equal to 200% Start vm failed with the same error as above: Cannot set up guest memory 'pc.ram': Cannot allocate memory 2015-04-21 13:37:24.556+0000: shutting down So it seem we need to check if host vm have less memory(not guaranteed) than host free memory + swap
(In reply to Artyom from comment #2) > Created attachment 1026435 [details] > vdsm and qemu log > > Checked on rhevm-3.5.3-0.2.el6ev.noarch > Have host with: > [root@alma05 ~]# free > total used free shared buff/cache > available > Mem: 16151584 536368 14852488 41680 762728 > 15259472 > Swap: 0 0 0 > > Try to run vm with memory=15000MB and guaranteed memory=1024MB under cluster > Memory Optimization equal to 200% > Start vm failed with the same error as above: > Cannot set up guest memory 'pc.ram': Cannot allocate memory > 2015-04-21 13:37:24.556+0000: shutting down > So it seem we need to check if host vm have less memory(not guaranteed) than > host free memory + swap The engine calculates available memory using minimal_guaranteed, and this is what you should be using. See: http://www.ovirt.org/Sla/FreeMemoryCalculation
Not really understand what you mean by minimal_guaranteed, if you mean "Max free Memory for scheduling new VMs" it value greater than free host memory because we have overcommitment equal to 200%, so bug still exist.
(In reply to Artyom from comment #4) > Not really understand what you mean by minimal_guaranteed, if you mean "Max > free Memory for scheduling new VMs" it value greater than free host memory > because we have overcommitment equal to 200%, so bug still exist. When creating a new VM you have a "Resource Allocation" side tab. In this tab you have "Physical Memory Guaranteed" and this is the part that is being used for scheduling memory calculation as you can read in the link I provided in comment 3. If you set this one the a value greater than host physical memory, that VM will be blocked from starting.
Doron said that we check only guaranteed memory. Verified on rhevm-3.5.3-0.2.el6ev.noarch Update VM with guaranteed above host free memory, run vm, receive message: "The host cyan-vdsf.qa.lab.tlv.redhat.com did not satisfy internal filter Memory because has availabe 7372 MB memory. Insufficient free memory to run the VM."
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-1095.html