From bug 609619 comment 10: Ballooning up domain0 after restarting xend still doesn't work: 1. # xm mem-max 0 4096 2. # xm li 0 -l | grep mem (memory 2049) (shadow_memory 0) (maxmem 4096) 3. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 4096 4. # service xend restart restart xend: [ OK ] 5. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 4096 6. # xm li 0 -l | grep mem (memory 2049) (shadow_memory 0) (maxmem 2049) 7. # xm mem-set 0 3000 Error: Memory size too large. Limit is 2049 MiB Usage: xm mem-set <Domain> <Mem> Set the current memory usage for a domain. Strange thing is that maxmem in 'xm list -l' is not the same value as in Xenstore. Is it expected?
It looks we should look in xenstore too. If it's not in the config and xenstore doesn't have it, then we should default to the value of 'memory'.
Or, on startup the config should be rebuilt from xenstore value (defaulting to the memory value). Maybe it's the same thing you were talking about. :)
Actually, I wasn't thinking about rebuilding the config, but you've raised a good point. We should see how the config is currently rebuilt. Without looking at the code, so just based on the problem we see here, it sounds like it isn't, or if it is, it isn't looking in xenstore for anything that doesn't exist in the config.
Created attachment 442441 [details] Fix maxmem handling This is fix for maxmem handling and disallowing the invalid maxmem value (value lower than memory currently allocated to domain). Michal
NOTE FOR QE: This patch restricts dom0 memory only. For domU you should be able to set domU's maxmem to higher value than total physical memory available on the host. For dom0 it doesn't make any sense so it's restricted to give dom0 more memory than physical host does have available.
Fix built into xen-3.0.3-118.el5
Version-Release number of selected component (if applicable): xen-3.0.3-116.el5 kernel-xen-2.6.18-231.el5 Step to reproduce: 1. # xm li 0 -l | grep mem (memory 7345) (shadow_memory 0) (maxmem 7345) 2. # xm mem-max 0 8000 3. # xm li 0 -l | grep mem (memory 7345) (shadow_memory 0) (maxmem 8000) 4. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 8000 5. # service xend restart 6. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 8000 7. # xm li 0 -l | grep mem (memory 7345) (shadow_memory 0) (maxmem 7345) 8. # xm mem-set 0 7500 Error: Memory size too large. Limit is 7345 MiB Usage: xm mem-set <Domain> <Mem> Actual results: 1. maxmem preservation after xend restart.
Version-Release number of selected component (if applicable): xen-3.0.3-118.el5 kernel-xen-2.6.18-231.el5 Actual steps: 1. # xm li 0 -l | grep mem (memory 6833) (shadow_memory 0) (maxmem 8187) 2. # xm mem-max 0 8000 3. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 8000 4. # xm li 0 -l | grep mem (memory 6833) (shadow_memory 0) (maxmem 8000) 5. # service xend restart 6. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 8000 7. # xm li 0 -l | grep mem (memory 6833) (shadow_memory 0) (maxmem 8000) 8. # xm mem-set 0 7500 9. # xm li 0 -l | grep mem (memory 7500) (shadow_memory 0) (maxmem 8000) 10. # xenstore-read /vm/00000000-0000-0000-0000-000000000000/maxmem 8000 Actual results: 1. maxmem works well after xend restart. So I change it to "verified"
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0031.html