[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] tools: Fix xm mem-max command.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181298081 -3600
# Node ID 55230846b2f47147c65a54fb10825455f5e02c48
# Parent  656b8175f4f24b5bb3a761e62c496075510914ed
tools: Fix xm mem-max command.

When I tested xm mem-max and xm list, I saw the following error
message by xm list.  Because xm mem-max always changes
"memory_static_max", I think that the cause of the error message
is it.  This patch fixes it.

# xm list --long PVdomain.1 | grep mem
    (maxmem 1024)
    (memory 1024)
    (shadow_memory 0)
# xm mem-max PVdomain.1 512
Error: (22, 'Invalid argument')
Usage: xm mem-max <Domain> <Mem>

Set the maximum amount reservation for a domain.
# xm list --long PVdomain.1 | grep mem
Error: memory_dynamic_max must be less than or equal to
memory_static_max

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 656b8175f4f2 -r 55230846b2f4 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Fri Jun 08 11:19:55 2007 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Fri Jun 08 11:21:21 2007 +0100
@@ -612,7 +612,7 @@ class XendDomainInfo:
             raise XendError('Invalid memory size')
 
         MiB = 1024 * 1024
-        self.info['memory_static_max'] = limit * MiB
+        self._safe_set_memory('memory_static_max', limit * MiB)
 
         if self.domid >= 0:
             maxmem = int(limit) * 1024

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.