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

[Xen-changelog] [xen-unstable] Fix sxp2xml translation to handle maxmem.



# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1174403737 0
# Node ID fc918d15c981bb310c524674e2cd1f18320475d5
# Parent  d86957cea8b83bd6421a36e9d45fb65606176447
Fix sxp2xml translation to handle maxmem.

Signed-off-by: Tom Wilkie <tom.wilkie@xxxxxxxxx>
---
 tools/python/xen/xm/xenapi_create.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletion(-)

diff -r d86957cea8b8 -r fc918d15c981 tools/python/xen/xm/xenapi_create.py
--- a/tools/python/xen/xm/xenapi_create.py      Tue Mar 20 15:12:07 2007 +0000
+++ b/tools/python/xen/xm/xenapi_create.py      Tue Mar 20 15:15:37 2007 +0000
@@ -513,10 +513,14 @@ class sxp2xml:
         memory_str = str(int(
             get_child_by_name(config, "memory"))*1024*1024)
 
-        memory.attributes["static_min"] = memory_str
+        memory.attributes["static_min"] = str(0)
         memory.attributes["static_max"] = memory_str
         memory.attributes["dynamic_min"] = memory_str
         memory.attributes["dynamic_max"] = memory_str
+
+        if get_child_by_name(config, "maxmem"):
+            memory.attributes["static_max"] = \
+               str(int(get_child_by_name(config, "maxmem")*1024*1024))
 
         vm.appendChild(memory)
 

_______________________________________________
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®.