From f2f605dfda5b731246ab932936e164b0fa94089c Mon Sep 17 00:00:00 2001 From: Koushik Das Date: Fri, 31 Jan 2014 10:35:19 +0530 Subject: [PATCH] CLOUDSTACK-5993: Cloud agent fails to start on 32-bit system vms (cpvm and ssvm) created with 4GB RAM offering Capped the max heap size of the JVM at 2600M for 32-bit system VMs. For 64-bit, existing logic works fine. --- systemvm/scripts/_run.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systemvm/scripts/_run.sh b/systemvm/scripts/_run.sh index bd063468cfb..1a37c7d372c 100755 --- a/systemvm/scripts/_run.sh +++ b/systemvm/scripts/_run.sh @@ -61,4 +61,11 @@ then maxmem=$eightypcnt fi +if [ "$(uname -m | grep '64')" == "" ]; then + let "maxmem32bit=2600" + if [ $maxmem -gt $maxmem32bit ]; then + maxmem=$maxmem32bit + fi +fi + java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -Dlog.home=$LOGHOME -mx${maxmem}m -cp $CP com.cloud.agent.AgentShell $keyvalues $@