From c66e0848f388fbd7443df1964930a5f92c67cc29 Mon Sep 17 00:00:00 2001 From: Rafal Wojtczuk Date: Tue, 31 Aug 2010 16:19:01 +0200 Subject: [PATCH] qmemman: limit domain memory to 2G to workaround for xen xml-rpc limitation File "/usr/lib64/python2.6/xmlrpclib.py", line 710, in dump_int raise OverflowError, "int exceeds XML-RPC limits" OverflowError: int exceeds XML-RPC limits How crappy. --- dom0/qmemman/qmemman.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dom0/qmemman/qmemman.py b/dom0/qmemman/qmemman.py index 915e61f3..46dfe75d 100755 --- a/dom0/qmemman/qmemman.py +++ b/dom0/qmemman/qmemman.py @@ -104,6 +104,9 @@ class SystemState: def mem_set(self, id, val): uuid = self.domdict[id].uuid + if val >= 2**31: + print 'limiting memory from ', val, 'to maxint because of xml-rpc lameness' + val = 2**31 - 1 print 'mem-set domain', id, 'to', val try: self.xend_session.session.xenapi.VM.set_memory_dynamic_max_live(uuid, val)