Bug 703693 - [balloon] Set maxmem of hvm guest got error
Summary: [balloon] Set maxmem of hvm guest got error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.7
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 699611
TreeView+ depends on / blocked
 
Reported: 2011-05-11 03:29 UTC by Yufang Zhang
Modified: 2012-02-21 05:54 UTC (History)
7 users (show)

Fixed In Version: xen-3.0.3-133.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-02-21 05:54:59 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0160 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2012-02-20 14:53:33 UTC

Description Yufang Zhang 2011-05-11 03:29:20 UTC
Description of problem:
On both Intel and AMD machines, I got error when I set maxmem as the same value of current memory size via 'xm mem-max'. No such issue for pv guest.  

Version-Release number of selected component (if applicable):
xen-3.0.3-130.el5
kernel-xen-2.6.18-259.el5

How reproducible:
Always.

Steps to Reproduce:

# xm li
Name                                      ID Mem(MiB) VCPUs State   Time(s)
Domain-0                                   0     3650    32 r-----  24645.2
vm1                                      146     1031     4 -b----   4953.1

# xm li vm1 -l | grep mem
    (memory 1024)
    (shadow_memory 12)
    (maxmem 1031)

# xm mem-max vm1 1031
Error: (22, 'Invalid argument')
Usage: xm mem-max <Domain> <Mem>

Set the maximum amount reservation for a domain.
  

Actual results:


Expected results:
No error when set maxmem to a valid value.

Additional info:
Nothing special in xend.log:

# tail -f /var/log/xen/xend.log
[2011-05-10 16:08:50 xend 8638] DEBUG (DevController:179) Waiting for devices ioports.
[2011-05-10 16:08:50 xend 8638] DEBUG (DevController:179) Waiting for devices tap.
[2011-05-10 16:08:50 xend 8638] DEBUG (DevController:179) Waiting for devices vtpm.
[2011-05-10 16:08:50 xend 8638] INFO (XendDomain:388) Domain vm1 (146) unpaused.
[2011-05-10 16:09:04 xend.XendDomainInfo 8638] DEBUG (XendDomainInfo:1437) Setting maximum memory value of domain vm1 (146) to 1024 MiB.
[2011-05-10 16:09:24 xend.XendDomainInfo 8638] DEBUG (XendDomainInfo:1437) Setting maximum memory value of domain vm1 (146) to 1031 MiB.
[2011-05-10 16:09:28 xend.XendDomainInfo 8638] DEBUG (XendDomainInfo:1437) Setting maximum memory value of domain vm1 (146) to 1035 MiB.
[2011-05-10 16:09:38 xend.XendDomainInfo 8638] DEBUG (XendDomainInfo:1437) Setting maximum memory value of domain vm1 (146) to 1031 MiB.
[2011-05-10 16:10:24 xend.XendDomainInfo 8638] DEBUG (XendDomainInfo:1437) Setting maximum memory value of domain vm1 (146) to 1031 MiB.
[2011-05-11 06:06:09 xend.XendDomainInfo 8638] DEBUG (XendDomainInfo:1437) Setting maximum memory value of domain vm1 (146) to 1031 MiB.

Comment 1 Yufang Zhang 2011-05-11 03:51:39 UTC
An update of this bug, the hvm guest is rhel5.5 or rhel5.6 in Description.

Comment 2 Paolo Bonzini 2011-05-31 10:56:31 UTC
*** Bug 643295 has been marked as a duplicate of this bug. ***

Comment 3 Paolo Bonzini 2011-05-31 11:01:51 UTC
oops, closed by mistake.

Comment 4 Paolo Bonzini 2011-06-03 13:41:14 UTC
The bug is simply that getSysMem is rounding down the amount in kilobytes.  So the actual value is 2055.something and it should be printed as 2056.  From a quick look, it is safe to change getSysMem to round up.

Comment 10 errata-xmlrpc 2012-02-21 05:54:59 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0160.html


Note You need to log in before you can comment on or make changes to this bug.