Bug 608072

Summary: updated xm mem-max values not picked up by mem-set, fails with an error
Product: Red Hat Enterprise Linux 5 Reporter: Paolo Bonzini <pbonzini>
Component: xenAssignee: Paolo Bonzini <pbonzini>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4CC: clalance, llim, mrezanin, mshao, rwu, xen-maint, yuzhang
Target Milestone: rcKeywords: Regression
Target Release: 5.6   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: xen-3.0.3-114.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 528431 Environment:
Last Closed: 2011-01-13 22:22:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 514500    

Comment 1 Paolo Bonzini 2010-06-25 15:40:14 UTC
Due to the error message added for invalid "xm mem-set" values, it is not possible to balloon domains with "xm mem-set" beyond the initial maxmem size.

Comment 7 Yufang Zhang 2010-08-25 06:32:45 UTC
QA verify this bug on xen-3.0.3-115:

1. # xm cr /tmp/xm-test.conf memory=512 maxmem=1024
Using config file "/tmp/xm-test.conf".
Using <class 'grub.GrubConf.GrubConfigFile'> to parse /grub/menu.lst
Started domain vm1

2. # xm li vm1
Name                                      ID Mem(MiB) VCPUs State   Time(s)
vm1                                       22      512     4 r-----      5.2

# xm li vm1 -l | grep mem
    (memory 512)
    (shadow_memory 0)
    (maxmem 1024)

3. # xm mem-set vm1 1500
Error: Memory size too large. Limit is 1024 MiB
Usage: xm mem-set <Domain> <Mem>

Set the current memory usage for a domain.

4. # xm li vm1 -l | grep mem
    (memory 512)
    (shadow_memory 0)
    (maxmem 1024)

# xm li vm1
Name                                      ID Mem(MiB) VCPUs State   Time(s)
vm1                                       22      511     4 -b----     10.0

5. # xm mem-max vm1 2048
 
   # xm mem-set vm1 1500


6. # xm li vm1 -l | grep mem
    (memory 1500)
    (shadow_memory 0)
    (maxmem 2048)

# xm li vm1
Name                                      ID Mem(MiB) VCPUs State   Time(s)
vm1                                       22      512     4 -b----     10.0

7. # xm reboot vm1

8. # xm li vm1
Name                                      ID Mem(MiB) VCPUs State   Time(s)
vm1                                       23     1499     4 -b----      6.2

# xm li vm1 -l | grep mem
    (memory 1500)
    (shadow_memory 0)
    (maxmem 2048)

From Step 6, we could know that maxmem has been pick up by Xenstore, and xm mem-set doesn't fail at Step 5. After reboot, the guest is created with new memory and maxmem. 

Change this bug to VERIFIED.

Comment 9 errata-xmlrpc 2011-01-13 22:22:30 UTC
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