Bug 189085

Summary: xend seems to mismeasure memory
Product: [Fedora] Fedora Reporter: Michael De La Rue <mvyynqbgerqungqbgpbz.yeuhc>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: bstein, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: xen-3.0.3-2.fc5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-01-11 16:20:59 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Michael De La Rue 2006-04-15 15:38:57 EDT
Description of problem:
On a recently cleanly installed machine with 2Gb of memory the
xenguest-install.py bombs out with the message 

Error: Error creating domain: I need 257 MiB, but dom0_min_mem is 256 and
shrinking to 256 MiB would leave only 1254 MiB free.

Version-Release number of selected component (if applicable):
xen-3.0.1-4
kernel-xen0-2.6.16-1.2080_FC5
kernel-xenU-2.6.16-1.2080_FC5

How reproducible:
every time 

Steps to Reproduce:
1. install FC5 / add xen rpms and dependencies manually
2. use yum to upgrade any fixes
3. boot into xenU0 / standard kernel options from install
4. run /usr/sbin/xenguest-install.py and answer as follows
What is the name of your virtual machine? test4
 How much RAM should be allocated (in megabytes)? 256
 What would you like to use as the disk (path)? /scratch/systems
 What is the install location?
http://ftp.ussg.iu.edu/linux/fedora/linux/core/5/i386//os/
  
Actual results:
Starting install...
Using config file "/etc/xen/test4".
Error: Error creating domain: I need 257 MiB, but dom0_min_mem is 256 and
shrinking to 256 MiB would leave only 1254 MiB free.
If your install has exited, you can restart your guest by running
'xm create -c test4'.  Otherwise, you can reconnect to the console
by running 'xm console test4'


no guest system is created in /scratch/systems

Expected results:
working xenU installation created / no error output.  

Additional info:
2GB Thinkpad R51.  This seems to be similar to Bug 184393 but I'm posting it as
a new bug since it's in the new/current software version.  I haven't yet tried
with selinux turned off, but I will reboot just after filing this info.  

xm mem-set 0 xxx  seems to work fine.
Comment 1 Michael De La Rue 2006-04-15 16:34:09 EDT
Turning of selinux with "setenforce 0" has no effect whatsoever.

Booting with "kernel /xen.gz-2.6.16-1.2080_FC5 dom0_mem=512M" in /etc/grub.conf
seems to fix this problem.  Looking at "xm top" it seems as if memory allocated
to domain 0 never falls, even if "xm mem-set 0 512" is used.  

At this point the installation continues on to crash at a later point.  
Comment 2 Jeremy Katz 2006-04-17 18:12:54 EDT
xend is doing a backwards comparison... I remember seeing the patch fly across
xen-devel a week or two ago
Comment 3 rhbugs@greebo.org 2006-05-05 12:23:43 EDT
Built a couple systems (one x86_64 one i386) and this problem seemed confined to
i386 version for some bizarre reason.
Comment 4 Daniel Berrange 2007-01-11 16:20:59 EST
The problem of the backwards memory comparison was fixed in the 3.0.3 release of
Xen. Since FC5 is now on xen-3.0.3-2.fc5, this ticket is resolved.