Bug 1197474 - Start vm that have memory and guaranteed memory above host free memory, failed with libvirtd error
Summary: Start vm that have memory and guaranteed memory above host free memory, faile...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-engine
Version: 3.5.0
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: 3.5.3
Assignee: Dudi Maroshi
QA Contact: Artyom
URL:
Whiteboard: sla
Depends On: 1180071
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-01 14:58 UTC by rhev-integ
Modified: 2016-02-10 20:18 UTC (History)
13 users (show)

Fixed In Version: org.ovirt.engine-root-3.5.3-2
Doc Type: Bug Fix
Doc Text:
Previously, when creating a virtual machine, if the value for the Physical Memory Guaranteed field exceeded the free memory available on the host, a generic libvirtd error returned. With this update, a memory detection parameter was added, and a proper error message is returned.
Clone Of: 1180071
Environment:
Last Closed: 2015-06-15 13:27:06 UTC
oVirt Team: SLA
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
vdsm and qemu log (477.19 KB, application/zip)
2015-05-17 09:00 UTC, Artyom
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1095 0 normal SHIPPED_LIVE Red Hat Enterprise Virtualization Manager 3.5.3 update 2015-06-15 17:26:37 UTC
oVirt gerrit 38399 0 ovirt-engine-3.5 MERGED engine: forbid single (vm mem) > (host mem) 2020-06-17 04:16:39 UTC

Comment 2 Artyom 2015-05-17 09:00:00 UTC
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

Comment 3 Doron Fediuck 2015-05-17 15:13:52 UTC
(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

Comment 4 Artyom 2015-05-18 09:56:39 UTC
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.

Comment 5 Doron Fediuck 2015-05-18 11:07:37 UTC
(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.

Comment 6 Artyom 2015-05-19 06:33:46 UTC
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."

Comment 8 errata-xmlrpc 2015-06-15 13:27:06 UTC
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


Note You need to log in before you can comment on or make changes to this bug.