---------- Forwarded message ----------
From:
weiming <
zephyr.zhao@xxxxxxxxx>
Date: Feb 17, 2008 4:52 PM
Subject: set_memory_dynamic_max_live causes int overflow
To:
xen-api@xxxxxxxxxxxxxxxxxxxHi,
In my script, I use
void set_memory_dynamic_max_live (session_id s, VM ref self, int max)
to set the dynamic memory of a domain.
However, if the target memory size is large, for example, 3.5G (3670016000 bytes), it gives the following error.
Traceback (most recent call last):
File "./myscript.py", line 482, in <module>
main()
File "./myscript.py", line 446, in main
Dom0.setMemory(DOM0_RESERVE)
File "./myscript.py", line 223, in setMemory
self.server.xenapi.VM.set_memory_dynamic_max_live(self.uuid,size_bytes)
File "/common/xen-build/xen-3.2.0/dist/install/usr/lib64/python/xen/xm/XenAPI.py", line 213, in __call__
return self.__send(self.__name, args)
File "/common/xen-build/xen-3.2.0/dist/install/usr/lib64/python/xen/xm/XenAPI.py", line 141, in xenapi_request
result = _parse_result(getattr(self, methodname)(*full_params))
File "/usr/lib64/python2.5/xmlrpclib.py", line 1150, in __call__
return self.__send(self.__name, args)
File "/common/xen-build/xen-3.2.0/dist/install/usr/lib64/python/xen/util/xmlrpcclient.py", line 118, in __request
response = xmlrpclib.ServerProxy.__request(self, methodname, params)
File "/usr/lib64/python2.5/xmlrpclib.py", line 1434, in __request
allow_none=self.__allow_none)
File "/usr/lib64/python2.5/xmlrpclib.py", line 1083, in dumps
data = "">
File "/usr/lib64/python2.5/xmlrpclib.py", line 623, in dumps
dump(v, write)
File "/usr/lib64/python2.5/xmlrpclib.py", line 638, in __dump
f(self, value, write)
File "/usr/lib64/python2.5/xmlrpclib.py", line 664, in dump_long
raise OverflowError, "long int exceeds XML-RPC limits"
OverflowError: long int exceeds XML-RPC limits
If I set the value as 1.5G (1572864000 bytes), it works fine.
Is there any way to deal with it?
btw, I using a 64bit dom0, python is also 64 bit.
Thanks,
Weiming