Description of problem: The UI logic of webadmin keeps VM's memory and minimal guaranteed memory in sync. So when the memory size is increased, the guaranteed memory increases too. Now, hotplug is attempted for VMs in UP state and the memory size is reduced to the amount returned from the hotplug command (see org.ovirt.engine.core.bll.UpdateVmCommand#hotSetMemory). But the minimal guaranteed memory is not updated here. Version-Release number of selected component (if applicable): master branch, probably 3.6 too How reproducible: Always using fakevdsm. Steps to Reproduce: 1. Edit a VM 2. Increase its memory 3. Save the VM 4. Wait for the hotplug command to finish (couple of seconds?) 5. Edit a VM again 6. Edit VM's name (for example), but do not touch the memory 7. Try saving the VM 8. Observe the error Actual results: Minimal guaranteed memory is higher than memory size and subsequent Edit VM attempts can't be saved until the memory size is fixed. Expected results: Minimal guaranteed memory is always kept <= memory size
I can't reproduce it following steps to reproduce from comment 0. Steps to reproduce that works for me: 4.0 master, commit 46c9875 (using real vdsm (master snapshots)) (Supposing that ConfigValues.HotPlugMemoryMultiplicationSizeMb = 256) 1. Create VM * 512 MB of memory (and guaranteed memory) * (to make it bootable) add network not nic1 * (to make it bootable) set firts boot device to "Network (PXE)" 2. Run that VM. 3. Edit the VM to increase memory to 768 MB (do NOT check "Apply later" in confirmation dialog). 4. Edit the VM to decrease memory to 256 MB. 5. Power off VM. 6. Open Edit VM dialog 7. Confirm Edit VM dialog using OK button. Actual results: Minimal guaranteed memory is highlighted as being incorrect.
also, hotSetMemlog() uses auditLogDirector.log(logable, AuditLogType.FAILED_HOT_SET_NUMBER_OF_CPUS) which seems to by a copy-paste mistake
(In reply to jniederm from comment #1) > Actual results: > Minimal guaranteed memory is highlighted as being incorrect. setting aside that you didn't do the original steps - isn't that the point, that it should not be incorrect?
It turned out that even steps to reproduce in comment 1 are not reliable. The key is try to decrease the memory when VM is in state "Starting". This allows to achieve state when actual memory is less than guaranteed memory.
(In reply to jniederm from comment #4) "Starting" ~ "PoweringUp"
also comment #2 please;-)
Regarging comment 2: yes, it's a bug. I've added a fix to the patch.
Verified on version: 3.6.5.3-0.1.el6 Verified steps: 1. Run VM. 2. While the VM is starting (powering up status) open the Edit dialog 3. Increase its memory 4. Save the VM 5. Edit a VM again 6. Edit VM's name (for example), but do not touch the memory 7. Saving the VM