ia64/xen-unstable

changeset 15295:55230846b2f4

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@jp.fujitsu.com>
author kfraser@localhost.localdomain
date Fri Jun 08 11:21:21 2007 +0100 (2007-06-08)
parents 656b8175f4f2
children b0109d3dc3dd
files tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Fri Jun 08 11:19:55 2007 +0100
     1.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Fri Jun 08 11:21:21 2007 +0100
     1.3 @@ -612,7 +612,7 @@ class XendDomainInfo:
     1.4              raise XendError('Invalid memory size')
     1.5  
     1.6          MiB = 1024 * 1024
     1.7 -        self.info['memory_static_max'] = limit * MiB
     1.8 +        self._safe_set_memory('memory_static_max', limit * MiB)
     1.9  
    1.10          if self.domid >= 0:
    1.11              maxmem = int(limit) * 1024