Description of problem: setup: 2GB machine, 1 domU with mem-max of 500M and actual memory usage of 256M, Dom0 uses 1.8G. When I allocate more memory to DomU using "xm mem-set vm1 400", there is no error and even "xm list" shows 1800M for Dom0 and 400M for vm1 DomU. running top inside the DomU only shows ~200M available memory, that's correct. Version-Release number of selected component (if applicable): xen-3.1.0-13.fc8 kernel-xen-2.6.21-2950.fc8 How reproducible: run xm mem-set to assign more memory to a DomU than available to the system Steps to Reproduce: 1.see above 2. 3. Actual results: no error Expected results: error that there is no more memory available and that you have to shrink the memory allocation for dom0 in order to assign more memory to a domU. Additional info:
The 'mem-set' command merely sets a *target value* for a guest, it does not attempt to immediately allocate it. The balloon driver in the guest will try to allocate memory from the hypervisor to meet this target - if there's not enough available, it will retry (pretty much forever) until it can get enough. In your case all your memory is assigned to Dom0 so there's nothing for the HV to give to DomU. You need to lower the allocation for Dom0 manually. This is explicitly not done automatically.