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:
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
(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
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'/>