Bug 1406749 - Starting a VM that has memory equal to the max memory raising QEMU error
Summary: Starting a VM that has memory equal to the max memory raising QEMU error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ovirt-4.1.0-beta
: 4.1.0.2
Assignee: jniederm
QA Contact: Artyom
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-21 11:46 UTC by Artyom
Modified: 2017-02-01 14:38 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-02-01 14:38:26 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.1+
rule-engine: planning_ack+
tjelinek: devel_ack+
mavital: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 69507 0 master MERGED core: maxMemory send only if it differs from memory 2017-01-04 13:13:55 UTC
oVirt gerrit 69536 0 ovirt-engine-4.1 MERGED core: maxMemory send only if it differs from memory 2017-01-04 18:00:42 UTC

Description Artyom 2016-12-21 11:46:03 UTC
Description of problem:
Starting a VM that has memory equal to the max memory raising QEMU error
2016-12-21 11:26:28.804+0000: 17651: info : virObjectUnref:259 : OBJECT_UNREF: obj=0x7fcd141c13e0
2016-12-21T11:26:28.884494Z qemu-kvm: -m size=21911552k,slots=16,maxmem=21911552k: invalid value of -m option maxmem: memory slots were specified but maximum memory size (0x539600000) is equal to the initial memory size (0x539600000)
2016-12-21 11:26:28.949+0000: shutting down

Version-Release number of selected component (if applicable):
# rpm -qa | grep qemu
qemu-kvm-common-rhev-2.6.0-28.el7_3.2.x86_64
ipxe-roms-qemu-20160127-5.git6366fa7a.el7.noarch
libvirt-daemon-driver-qemu-2.0.0-10.el7.x86_64
qemu-img-rhev-2.6.0-28.el7_3.2.x86_64
qemu-kvm-rhev-2.6.0-28.el7_3.2.x86_64
qemu-kvm-tools-rhev-2.6.0-28.el7_3.2.x86_64

ovirt-engine-4.1.0-0.2.master.20161218144454.gitbaa2853.el7.centos.noarch

How reproducible:
Always

Steps to Reproduce:
1. Update VM max memory parameter to be equal to memory parameter
2. Start the VM
3.

Actual results:
VM failed to start with the QEMU error

Expected results:
I believe we must add validation on the updateVm action to prevent updating a VM with the max memory equal to the memory

Additional info:

Comment 1 Michal Skrivanek 2016-12-22 07:43:25 UTC
the easiest fix might be to set the max size +4K when equal. Difference in reporting should be negligent and it seems to be enough to fool qemu. Better than trying to introduce a hotpluggable and non-hotpluggable VMs differentiation right now

Comment 2 Michal Skrivanek 2016-12-22 07:52:30 UTC
(In reply to Michal Skrivanek from comment #1)
> the easiest fix might be to set the max size +4K when equal.
I mean to send it like that, not persist. Perhaps do that even only in vdsm

Comment 3 Artyom 2017-01-11 09:38:18 UTC
Verified on ovirt-engine-4.1.0-0.4.master.20170110134514.git1586fd4.el7.centos.noarch

Run the VM with the maxMemory = memory:
# virsh -r dumpxml 47 | grep -i memory
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
      <cell id='0' cpus='0' memory='1048576' unit='KiB'/>

Run the VM with the maxMemory != memory:
# virsh -r dumpxml 46 | grep -i memory
  <maxMemory slots='16' unit='KiB'>2097152</maxMemory>
  <memory unit='KiB'>1048576</memory>
  <currentMemory unit='KiB'>1048576</currentMemory>
      <cell id='0' cpus='0' memory='1048576' unit='KiB'/>


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