cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [09/59] [abbrv] Move the system vm to a separate maven project.
Date Wed, 25 Sep 2013 10:29:04 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/config_ssl.sh
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/config_ssl.sh b/services/console-proxy/server/scripts/config_ssl.sh
deleted file mode 100755
index e474787..0000000
--- a/services/console-proxy/server/scripts/config_ssl.sh
+++ /dev/null
@@ -1,183 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-
- 
-help() {
-   printf " -c use customized key/cert\n"
-   printf " -k path of private key\n"
-   printf " -p path of certificate of public key\n"
-   printf " -t path of certificate chain\n"
-}
-
-
-config_httpd_conf() {
-  local ip=$1
-  local srvr=$2
-  cp -f /etc/httpd/conf/httpd.conf.orig /etc/httpd/conf/httpd.conf
-  sed -i -e "s/Listen.*:80$/Listen $ip:80/" /etc/httpd/conf/httpd.conf
-  echo "<VirtualHost $ip:443> " >> /etc/httpd/conf/httpd.conf
-  echo "  DocumentRoot /var/www/html/" >> /etc/httpd/conf/httpd.conf
-  echo "  ServerName $srvr" >> /etc/httpd/conf/httpd.conf
-  echo "  SSLEngine on" >>  /etc/httpd/conf/httpd.conf
-  echo "  SSLCertificateFile /etc/httpd/ssl/certs/realhostip.crt" >>  /etc/httpd/conf/httpd.conf
-  echo "  SSLCertificateKeyFile /etc/httpd/ssl/keys/realhostip.key" >> /etc/httpd/conf/httpd.conf
-  echo "</VirtualHost>" >> /etc/httpd/conf/httpd.conf
-}
-
-config_apache2_conf() {
-  local ip=$1
-  local srvr=$2
-  cp -f /etc/apache2/sites-available/default.orig /etc/apache2/sites-available/default
-  cp -f /etc/apache2/sites-available/default-ssl.orig /etc/apache2/sites-available/default-ssl
-  sed -i -e "s/<VirtualHost.*>/<VirtualHost $ip:80>/" /etc/apache2/sites-available/default
-  sed -i -e "s/<VirtualHost.*>/<VirtualHost $ip:443>/" /etc/apache2/sites-available/default-ssl
-  sed -i -e "s/Listen .*:80/Listen $ip:80/g" /etc/apache2/ports.conf
-  sed -i -e "s/Listen .*:443/Listen $ip:443/g" /etc/apache2/ports.conf
-  sed -i -e "s/NameVirtualHost .*:80/NameVirtualHost $ip:80/g" /etc/apache2/ports.conf
-  sed -i  's/ssl-cert-snakeoil.key/cert_apache.key/' /etc/apache2/sites-available/default-ssl
-  sed -i  's/ssl-cert-snakeoil.pem/cert_apache.crt/' /etc/apache2/sites-available/default-ssl
-}
-
-copy_certs() {
-  local certdir=$(dirname $0)/certs
-  local mydir=$(dirname $0)
-  if [ -d $certdir ] && [ -f $customPrivKey ] &&  [ -f $customPrivCert ] ; then
-       mkdir -p /etc/httpd/ssl/keys  &&  mkdir -p /etc/httpd/ssl/certs  &&  cp $customprivKey /etc/httpd/ssl/keys   &&  cp $customPrivCert /etc/httpd/ssl/certs
-      return $?
-  fi
-  if [ ! -z customCertChain ] && [ -f $customCertChain ] ; then
-     cp $customCertChain /etc/httpd/ssl/certs  
-  fi
-  return 1
-}
-
-copy_certs_apache2() {
-  local certdir=$(dirname $0)/certs
-  local mydir=$(dirname $0)
-  if [ -f $customPrivKey ] &&  [ -f $customPrivCert ] ; then
-      cp $customPrivKey /etc/ssl/private/cert_apache.key   &&  cp $customPrivCert /etc/ssl/certs/cert_apache.crt
-  fi
-  if [ ! -z "$customCertChain" ] && [ -f "$customCertChain" ] ; then
-     cp $customCertChain /etc/ssl/certs/cert_apache_chain.crt
-  fi
-  return 0
-}
-
-
-cflag=
-cpkflag=
-cpcflag=
-cccflag=
-customPrivKey=$(dirname $0)/certs/realhostip.key
-customPrivCert=$(dirname $0)/certs/realhostip.crt
-customCertChain=
-publicIp=
-hostName=
-keyStore=$(dirname $0)/certs/realhostip.keystore
-aliasName="CPVMCertificate"
-storepass="vmops.com"
-while getopts 'i:h:k:p:t:c' OPTION
-do
-  case $OPTION in
-     c) cflag=1
-        ;;
-     k) cpkflag=1
-        customPrivKey="$OPTARG"
-        ;;
-     p) cpcflag=1
-        customPrivCert="$OPTARG"
-        ;;
-     t) cccflag=1
-        customCertChain="$OPTARG"
-        ;;
-     i) publicIp="$OPTARG"
-        ;;
-     h) hostName="$OPTARG"
-        ;;
-     ?) help
-        ;;
-   esac
-done
-
-
-if [ -z "$publicIp" ] || [ -z "$hostName" ]
-then
-   help
-   exit 1
-fi
-
-if [ "$cflag" == "1" ]
-then
-  if [ "$cpkflag$cpcflag" != "11" ] 
-  then
-     help
-     exit 1
-  fi
-  if [ ! -f "$customPrivKey" ]
-  then
-     printf "priviate key file is not exist\n"
-     exit 2
-  fi
-
-  if [ ! -f "$customPrivCert" ]
-  then
-     printf "public certificate is not exist\n"
-     exit 3
-  fi
-
-  if [ "$cccflag" == "1" ] 
-  then
-     if [ ! -f "$customCertChain" ]
-     then
-        printf "certificate chain is not exist\n"
-        exit 4
-     fi
-  fi
-fi
-
-if [ -d /etc/apache2 ]
-then
-  copy_certs_apache2
-else
-  copy_certs
-fi
-
-if [ $? -ne 0 ]
-then
-  echo "Failed to copy certificates"
-  exit 2
-fi
-
-if [ -f "$customPrivCert" ]
-then
-  keytool -delete -alias $aliasName -keystore $keyStore -storepass $storepass -noprompt
-  keytool -import -alias $aliasName -keystore $keyStore -storepass $storepass -noprompt -file $customPrivCert
-fi
-
-if [ -d /etc/apache2 ]
-then
-  config_apache2_conf $publicIp $hostName
-  /etc/init.d/apache2 stop
-  /etc/init.d/apache2 start
-else
-  config_httpd_conf $publicIp $hostName
-fi
-
-

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/consoleproxy.sh
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/consoleproxy.sh b/services/console-proxy/server/scripts/consoleproxy.sh
deleted file mode 100755
index 294d597..0000000
--- a/services/console-proxy/server/scripts/consoleproxy.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-
-#runs the console proxy as a standalone server
-#i.e., not in the system vm
-
-CP=./:./conf
-for file in *.jar
-do
-  CP=${CP}:$file
-done
-keyvalues=
-#LOGHOME=/var/log/cloud/
-LOGHOME=$PWD/
-
-java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -Dlog.home=$LOGHOME -cp $CP com.cloud.agent.AgentShell $keyvalues $@

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/ipfirewall.sh
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/ipfirewall.sh b/services/console-proxy/server/scripts/ipfirewall.sh
deleted file mode 100755
index 4711b8a..0000000
--- a/services/console-proxy/server/scripts/ipfirewall.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-BASE_DIR="/var/www/html/copy/"
-HTACCESS="$BASE_DIR/.htaccess"
-
-config_htaccess() {
-  mkdir -p $BASE_DIR
-  result=$?
-  echo "Options -Indexes" > $HTACCESS
-  let "result=$result+$?"
-  echo "order deny,allow" >> $HTACCESS
-  let "result=$result+$?"
-  echo "deny from all" >> $HTACCESS
-  let "result=$result+$?"
-  return $result
-}
-
-ips(){
-  echo "allow from $1" >> $HTACCESS
-  result=$?
-  return $result
-}
-
-is_append="$1"
-shift
-if [ $is_append != "true" ]; then
-	config_htaccess
-fi
-for i in $@
-do
-        ips "$i"
-done
-exit $?
-

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/run-proxy.sh
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/run-proxy.sh b/services/console-proxy/server/scripts/run-proxy.sh
deleted file mode 100644
index d6ccf7c..0000000
--- a/services/console-proxy/server/scripts/run-proxy.sh
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-
- 
-
-#run.sh runs the console proxy.
-
-# make sure we delete the old files from the original template 
-rm console-proxy.jar
-rm console-common.jar
-rm conf/cloud.properties
-
-CP=./:./conf
-for file in *.jar
-do
-  CP=${CP}:$file
-done
-
-#CMDLINE=$(cat /proc/cmdline)
-#for i in $CMDLINE
-#  do
-#     KEY=$(echo $i | cut -d= -f1)
-#     VALUE=$(echo $i | cut -d= -f2)
-#     case $KEY in
-#       mgmt_host)
-#          MGMT_HOST=$VALUE
-#          ;;
-#     esac
-#  done
-   
-java -mx700m -cp $CP:./conf com.cloud.consoleproxy.ConsoleProxy $@

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/run.bat
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/run.bat b/services/console-proxy/server/scripts/run.bat
deleted file mode 100644
index ce6dc40..0000000
--- a/services/console-proxy/server/scripts/run.bat
+++ /dev/null
@@ -1,18 +0,0 @@
-rem  Licensed to the Apache Software Foundation (ASF) under one
-rem  or more contributor license agreements.  See the NOTICE file
-rem  distributed with this work for additional information
-rem  regarding copyright ownership.  The ASF licenses this file
-rem  to you under the Apache License, Version 2.0 (the
-rem  "License"); you may not use this file except in compliance
-rem  with the License.  You may obtain a copy of the License at
-rem  
-rem    http://www.apache.org/licenses/LICENSE-2.0
-rem  
-rem  Unless required by applicable law or agreed to in writing,
-rem  software distributed under the License is distributed on an
-rem  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-rem  KIND, either express or implied.  See the License for the
-rem  specific language governing permissions and limitations
-rem  under the License.
-
-java -mx700m -cp cloud-console-proxy.jar;;cloud-console-common.jar;log4j-1.2.15.jar;apache-log4j-extras-1.0.jar;gson-1.3.jar;commons-logging-1.1.1.jar;.;.\conf; com.cloud.consoleproxy.ConsoleProxy %*

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/run.sh
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/run.sh b/services/console-proxy/server/scripts/run.sh
deleted file mode 100755
index 146d96f..0000000
--- a/services/console-proxy/server/scripts/run.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-
- 
-
-#_run.sh runs the agent client.
-
-# set -x
- 
-while true
-do
-  ./_run.sh "$@" &
-  wait
-  ex=$?
-  if [ $ex -eq 0 ] || [ $ex -eq 1 ] || [ $ex -eq 66 ] || [ $ex -gt 128 ]; then
-      # permanent errors
-      sleep 5
-  fi
-
-  # user stop agent by service cloud stop
-  grep 'stop' /usr/local/cloud/systemvm/user_request &>/dev/null
-  if [ $? -eq 0 ]; then
-      timestamp=$(date)
-      echo "$timestamp User stops cloud.com service" >> /var/log/cloud.log
-      exit 0
-  fi
-  sleep 5
-done

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/scripts/secstorage.sh
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/scripts/secstorage.sh b/services/console-proxy/server/scripts/secstorage.sh
deleted file mode 100755
index b45afc2..0000000
--- a/services/console-proxy/server/scripts/secstorage.sh
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-
-#runs the secondary storage service as a standalone server
-#i.e., not in the system vm
-
-CP=./:./conf
-for file in *.jar
-do
-  CP=${CP}:$file
-done
-keyvalues=
-#LOGHOME=/var/log/cloud/
-LOGHOME=$PWD/
-
-java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -Dlog.home=$LOGHOME -cp $CP com.cloud.agent.AgentShell $keyvalues $@

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/systemvm-descriptor.xml
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/systemvm-descriptor.xml b/services/console-proxy/server/systemvm-descriptor.xml
deleted file mode 100644
index 6c98d2d..0000000
--- a/services/console-proxy/server/systemvm-descriptor.xml
+++ /dev/null
@@ -1,122 +0,0 @@
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
-  <id>systemvm</id>
-  <formats>
-    <format>zip</format>
-  </formats>
-  <includeBaseDirectory>false</includeBaseDirectory>
-  <dependencySets>
-    <dependencySet>
-      <outputDirectory></outputDirectory>
-    </dependencySet>
-  </dependencySets>
-  <fileSets>
-    <fileSet>
-      <directory>../../../scripts/storage/secondary/</directory>
-      <outputDirectory>scripts/storage/secondary</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-    </fileSet>
-    <fileSet>
-      <directory>../../secondary-storage/scripts/</directory>
-      <outputDirectory></outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>ssvm-check.sh</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>../../../scripts/storage/secondary/</directory>
-      <outputDirectory>scripts/storage/secondary</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-    </fileSet>
-    <fileSet>
-      <directory>scripts</directory>
-      <outputDirectory></outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-    </fileSet>
-    <fileSet>
-      <directory>conf</directory>
-      <outputDirectory>conf</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>log4j-cloud.xml</include>
-	<include>consoleproxy.properties</include>
-	<include>agent.properties</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>images</directory>
-      <outputDirectory>images</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>*.jpg</include>
-	<include>*.gif</include>
-        <include>*.png</include>
-        <include>*.cur</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>js</directory>
-      <outputDirectory>js</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>*.js</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>ui</directory>
-      <outputDirectory>ui</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>*.ftl</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>css</directory>
-      <outputDirectory>css</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>*.css</include>
-      </includes>
-    </fileSet>
-    <fileSet>
-      <directory>certs</directory>
-      <outputDirectory>certs</outputDirectory>
-      <directoryMode>555</directoryMode>
-      <fileMode>555</fileMode>
-      <includes>
-        <include>*.keystore</include>
-        <include>*.crt</include>
-        <include>*.key</include>
-      </includes>
-    </fileSet>
-  </fileSets>
-</assembly>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/ui/viewer-bad-sid.ftl
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/ui/viewer-bad-sid.ftl b/services/console-proxy/server/ui/viewer-bad-sid.ftl
deleted file mode 100644
index 2f30ec3..0000000
--- a/services/console-proxy/server/ui/viewer-bad-sid.ftl
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
- 
-  http://www.apache.org/licenses/LICENSE-2.0
-    
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html>
-<head>
-</head>
-<body>
-
-<div id="main_panel" tabindex="1">
-<p>Unable to start console session as access is denied because of bad sid</p>
-</div>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/ui/viewer-connect-failed.ftl
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/ui/viewer-connect-failed.ftl b/services/console-proxy/server/ui/viewer-connect-failed.ftl
deleted file mode 100644
index 9d907ca..0000000
--- a/services/console-proxy/server/ui/viewer-connect-failed.ftl
+++ /dev/null
@@ -1,29 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
- 
-  http://www.apache.org/licenses/LICENSE-2.0
-    
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html>
-<head>
-</head>
-<body>
-
-<div id="main_panel" tabindex="1">
-<p>Unable to start console session as connection is refused by the machine you are accessing</p>
-</div>
-
-</body>
-</html>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/ui/viewer-update.ftl
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/ui/viewer-update.ftl b/services/console-proxy/server/ui/viewer-update.ftl
deleted file mode 100644
index 6bf9ab3..0000000
--- a/services/console-proxy/server/ui/viewer-update.ftl
+++ /dev/null
@@ -1,24 +0,0 @@
-<#--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-tileMap = [ ${tileSequence} ];
-<#if resized == true>
-	ajaxViewer.resize('main_panel', ${width}, ${height}, ${tileWidth}, ${tileHeight}); 
-</#if>
-ajaxViewer.refresh('${imgUrl}', tileMap, false);
- 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/ui/viewer.ftl
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/ui/viewer.ftl b/services/console-proxy/server/ui/viewer.ftl
deleted file mode 100644
index 62de193..0000000
--- a/services/console-proxy/server/ui/viewer.ftl
+++ /dev/null
@@ -1,60 +0,0 @@
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements.  See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership.  The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License.  You may obtain a copy of the License at
- 
-  http://www.apache.org/licenses/LICENSE-2.0
-    
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied.  See the License for the
-specific language governing permissions and limitations
-under the License.
--->
-<html>
-<head>
-<script type="text/javascript" language="javascript" src="/resource/js/jquery.js"></script>
-<script type="text/javascript" language="javascript" src="/resource/js/ajaxviewer.js"></script>
-<script type="text/javascript" language="javascript" src="/resource/js/ajaxkeys.js"></script>
-<script type="text/javascript" language="javascript" src="/resource/js/handler.js"></script>
-<link rel="stylesheet" type="text/css" href="/resource/css/ajaxviewer.css"></link>
-<title>${title}</title>
-</head>
-<body>
-<div id="toolbar">
-<ul>
-	<li> 
-		<a href="#" onclick="javascript:sendCtrlAltDel();"> 
-			<span><img align="left" src="/resource/images/cad.gif" alt="Ctrl-Alt-Del" />Ctrl-Alt-Del</span> 
-		</a> 
-	</li>
-	<li> 
-		<a href="#" onclick="javascript:sendCtrlEsc();"> 
-			<span><img align="left" src="/resource/images/winlog.png" alt="Ctrl-Esc" style="width:16px;height:16px"/>Ctrl-Esc</span> 
-		</a> 
-	</li>
-</ul>
-<span id="light" class="dark"></span> 
-</div>
-
-<div id="main_panel" tabindex="1"></div>
-	
-<script language="javascript">
-
-var tileMap = [ ${tileSequence} ];
-var ajaxViewer = new AjaxViewer('main_panel', '${imgUrl}', '${updateUrl}', tileMap, 
-	${width}, ${height}, ${tileWidth}, ${tileHeight}, ${rawKeyboard});
-
-$(function() {
-	ajaxViewer.start();
-});
-
-</script>
-
-</body>
-</html>	

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/services/console-proxy/server/vm-script/vmops
----------------------------------------------------------------------
diff --git a/services/console-proxy/server/vm-script/vmops b/services/console-proxy/server/vm-script/vmops
deleted file mode 100644
index a9f70c8..0000000
--- a/services/console-proxy/server/vm-script/vmops
+++ /dev/null
@@ -1,119 +0,0 @@
-#!/bin/bash
-#
-# vmops		Script to start and stop the VMOps Agent.
-#
-# Author:       Chiradeep Vittal <chiradeep@vmops.com>
-# chkconfig: 2345 99 01
-# description: 	Start up the VMOps agent
-
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-# 
-#   http://www.apache.org/licenses/LICENSE-2.0
-# 
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-# Source function library.
-if [ -f /etc/init.d/functions ]
-then
-  . /etc/init.d/functions
-fi
-
-_success() {
-  if [ -f /etc/init.d/functions ]
-  then
-    success
-  else
-    echo "Success"
-  fi
-}
-
-_failure() {
-  if [ -f /etc/init.d/functions ]
-  then
-    failure
-  else
-    echo "Failed"
-  fi
-}
-RETVAL=$?
-VMOPS_HOME="/usr/local/vmops"
-
-mkdir -p /var/log/vmops
-
-get_pids() {
-  local i
-  for i in $(ps -ef| grep java | grep -v grep | awk '{print $2}'); 
-  do 
-    echo $(pwdx $i) | grep "$VMOPS_HOME" | grep -i console | awk -F: '{print $1}'; 
-  done
-}
-
-start() {
-   local pid=$(get_pids)
-   echo -n "Starting VMOps Console Proxy: "
-   if [ -f $VMOPS_HOME/consoleproxy/run.sh ];
-   then
-     if [ "$pid" == "" ]
-     then
-       (cd $VMOPS_HOME/consoleproxy; nohup ./run.sh > /var/log/vmops/vmops.out 2>&1 & )
-       pid=$(get_pids)
-       echo $pid > /var/run/vmops.pid 
-     fi
-     _success
-   else
-     _failure
-   fi
-   echo
-}
-
-stop() {
-  local pid
-  echo -n  "Stopping VMOps agent: "
-  for pid in $(get_pids)
-  do
-    kill $pid
-  done
-  _success
-  echo
-}
-
-status() {
-  local pids=$(get_pids)
-  if [ "$pids" == "" ]
-  then
-    echo "VMOps agent is not running"
-    return 1
-  fi
-  echo "VMOps agent is running: process id: $pids"
-  return 0
-}
-
-
-case "$1" in
-   start) start
-	  ;;
-    stop) stop
- 	  ;;
-    status) status
- 	  ;;
- restart) stop
-          start
- 	  ;;
-       *) echo $"Usage: $0 {start|stop|status|restart}"
-	  exit 1
-	  ;;
-esac
-
-exit $RETVAL

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/bindir/cloud-setup-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/bindir/cloud-setup-console-proxy.in b/systemvm/bindir/cloud-setup-console-proxy.in
new file mode 100755
index 0000000..6439c0f
--- /dev/null
+++ b/systemvm/bindir/cloud-setup-console-proxy.in
@@ -0,0 +1,220 @@
+#!/usr/bin/env python
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+import sys, os, subprocess, errno, re, getopt
+
+# ---- This snippet of code adds the sources path and the waf configured PYTHONDIR to the Python path ----
+# ---- We do this so cloud_utils can be looked up in the following order:
+# ---- 1) Sources directory
+# ---- 2) waf configured PYTHONDIR
+# ---- 3) System Python path
+for pythonpath in (
+		"@PYTHONDIR@",
+		os.path.join(os.path.dirname(__file__),os.path.pardir,os.path.pardir,"python","lib"),
+	):
+		if os.path.isdir(pythonpath): sys.path.insert(0,pythonpath)
+# ---- End snippet of code ----
+import cloud_utils
+from cloud_utils import stderr
+
+E_GENERIC= 1
+E_NOKVM = 2
+E_NODEFROUTE = 3
+E_DHCP = 4
+E_NOPERSISTENTNET = 5
+E_NETRECONFIGFAILED = 6
+E_VIRTRECONFIGFAILED = 7
+E_FWRECONFIGFAILED = 8
+E_CPRECONFIGFAILED = 9
+E_CPFAILEDTOSTART = 10
+E_NOFQDN = 11
+
+def bail(errno=E_GENERIC,message=None,*args):
+	if message: stderr(message,*args)
+	stderr("Cloud Console Proxy setup aborted")
+	sys.exit(errno)
+
+
+#---------------- boilerplate for python 2.4 support 
+
+
+# CENTOS does not have this -- we have to put this here
+try:
+	from subprocess import check_call
+	from subprocess import CalledProcessError
+except ImportError:
+	def check_call(*popenargs, **kwargs):
+		import subprocess
+		retcode = subprocess.call(*popenargs, **kwargs)
+		cmd = kwargs.get("args")
+		if cmd is None: cmd = popenargs[0]
+		if retcode: raise CalledProcessError(retcode, cmd)
+		return retcode
+
+	class CalledProcessError(Exception):
+		def __init__(self, returncode, cmd):
+			self.returncode = returncode ; self.cmd = cmd
+		def __str__(self): return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode)
+
+# ------------ end boilerplate -------------------------
+
+def check_hostname(): return check_call(["hostname",'--fqdn'])
+
+class Command:
+	def __init__(self,name,parent=None):
+		self.__name = name
+		self.__parent = parent
+	def __getattr__(self,name):
+		if name == "_print": name = "print"
+		return Command(name,self)
+	def __call__(self,*args):
+		cmd = self.__get_recursive_name() + list(args)
+		#print "	",cmd
+		popen = subprocess.Popen(cmd,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+		m = popen.communicate()
+		ret = popen.wait()
+		if ret:
+			e = CalledProcessError(ret,cmd)
+			e.stdout,e.stderr = m
+			raise e
+		class CommandOutput:
+			def __init__(self,stdout,stderr):
+				self.stdout = stdout
+				self.stderr = stderr
+		return CommandOutput(*m)
+	def __lt__(self,other):
+		cmd = self.__get_recursive_name()
+		#print "	",cmd,"<",other
+		popen = subprocess.Popen(cmd,stdin=subprocess.PIPE,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
+		m = popen.communicate(other)
+		ret = popen.wait()
+		if ret:
+			e = CalledProcessError(ret,cmd)
+			e.stdout,e.stderr = m
+			raise e
+		class CommandOutput:
+			def __init__(self,stdout,stderr):
+				self.stdout = stdout
+				self.stderr = stderr
+		return CommandOutput(*m)
+		
+	def __get_recursive_name(self,sep=None):
+		m = self
+		l = []
+		while m is not None:
+			l.append(m.__name)
+			m = m.__parent
+		l.reverse()
+		if sep: return sep.join(l)
+		else: return l
+	def __str__(self):
+		return '<Command %r>'%self.__get_recursive_name(sep=" ")
+		
+	def __repr__(self): return self.__str__()
+
+ip = Command("ip")
+service = Command("service")
+chkconfig = Command("chkconfig")
+ufw = Command("ufw")
+iptables = Command("iptables")
+augtool = Command("augtool")
+ifconfig = Command("ifconfig")
+uuidgen = Command("uuidgen")
+
+Fedora = os.path.exists("/etc/fedora-release")
+CentOS = os.path.exists("/etc/centos-release") or ( os.path.exists("/etc/redhat-release") and not os.path.exists("/etc/fedora-release") )
+
+#--------------- procedure starts here ------------
+
+def main():
+	# parse cmd line	
+	opts, args = getopt.getopt(sys.argv[1:], "a", ["host=", "zone=", "pod="])
+	host=None
+	zone=None
+	pod=None
+    	autoMode=False
+	do_check_kvm = True	
+	for opt, arg in opts:
+		if opt == "--host":
+			if arg != "":
+				host = arg
+		elif opt == "--zone":
+			if arg != "":
+				zone = arg
+		elif opt == "--pod":
+		        if arg != "":
+				pod = arg
+        	elif opt == "-a":
+            		autoMode=True
+	servicename = "@PACKAGE@-console-proxy"
+	
+	if autoMode:
+		cloud_utils.setLogFile("/var/log/cloud/setupConsoleProxy.log")
+
+	stderr("Welcome to the Cloud Console Proxy setup")
+	stderr("")
+
+	try:
+		check_hostname()
+		stderr("The hostname of this machine is properly set up")
+	except CalledProcessError,e:
+		bail(E_NOFQDN,"This machine does not have an FQDN (fully-qualified domain name) for a hostname")
+
+	stderr("Stopping the Cloud Console Proxy")
+	cloud_utils.stop_service(servicename)
+	stderr("Cloud Console Proxy stopped")
+
+	ports = "8002".split()
+	if Fedora or CentOS:
+		try:
+			o = chkconfig("--list","iptables")
+			if ":on" in o.stdout and os.path.exists("/etc/sysconfig/iptables"):
+				stderr("Setting up firewall rules to permit traffic to Cloud services")
+				service.iptables.start() ; print o.stdout + o.stderr
+				for p in ports: iptables("-I","INPUT","1","-p","tcp","--dport",p,'-j','ACCEPT')
+				o = service.iptables.save() ; print o.stdout + o.stderr
+		except CalledProcessError,e:
+			print e.stdout+e.stderr
+			bail(E_FWRECONFIGFAILED,"Firewall rules could not be set")
+	else:
+		stderr("Setting up firewall rules to permit traffic to Cloud services")
+		try:
+			for p in ports: ufw.allow(p)
+			stderr("Rules set")
+		except CalledProcessError,e:
+			print e.stdout+e.stderr
+			bail(E_FWRECONFIGFAILED,"Firewall rules could not be set")
+
+		stderr("We are going to enable ufw now.  This may disrupt network connectivity and service availability.  See the ufw documentation for information on how to manage ufw firewall policies.")
+		try:
+			o = ufw.enable < "y\n" ; print o.stdout + o.stderr
+		except CalledProcessError,e:
+			print e.stdout+e.stderr
+			bail(E_FWRECONFIGFAILED,"Firewall could not be enabled")
+
+	cloud_utils.setup_consoleproxy_config("@CPSYSCONFDIR@/agent.properties", host, zone, pod)
+	stderr("Enabling and starting the Cloud Console Proxy")
+	cloud_utils.enable_service(servicename)
+	stderr("Cloud Console Proxy restarted")
+
+if __name__ == "__main__":
+	main()
+
+# FIXMES: 1) nullify networkmanager on ubuntu (asking the user first) and enable the networking service permanently

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/certs/localhost.crt
----------------------------------------------------------------------
diff --git a/systemvm/certs/localhost.crt b/systemvm/certs/localhost.crt
new file mode 100644
index 0000000..005d98b
--- /dev/null
+++ b/systemvm/certs/localhost.crt
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDrTCCApWgAwIBAgIBADANBgkqhkiG9w0BAQUFADBxMQswCQYDVQQGEwJVUzEL
+MAkGA1UECAwCQ0ExEjAQBgNVBAcMCUN1cGVydGlubzESMBAGA1UECgwJQ2xvdWQu
+Y29tMRAwDgYDVQQLDAdEZWZhdWx0MRswGQYDVQQDDBJTZWNvbmRhcnlTdG9yYWdl
+Vk0wHhcNMTAwNTI3MTgzNjI1WhcNMTMwMjIwMTgzNjI1WjBxMQswCQYDVQQGEwJV
+UzELMAkGA1UECAwCQ0ExEjAQBgNVBAcMCUN1cGVydGlubzESMBAGA1UECgwJQ2xv
+dWQuY29tMRAwDgYDVQQLDAdEZWZhdWx0MRswGQYDVQQDDBJTZWNvbmRhcnlTdG9y
+YWdlVk0wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCbhstQ5Gn2gzrk
+ZX1es+tuz4rnrcONRHUzyY/UdoT5jiVfmmS9CML/GgSpKzmnEMNZcCSh7G/GKPwD
+gBZywpTVD56nYT4ZzK0GjPxcg0a+BvxxA2esQ2/kFBvtdcZ1TNExtjdOqysjK0It
+M6U2891wbn+Y9oHqooTA0uaZELTpe/MCg2eBx7A4+u26novHHfOaKEEqtBscpDP8
+0+nQduNQf61haV25Lv2CDqrCIuv/FrNmgQhcUg8e1dFkk4VCsflEDuSYh9PpaD7J
+t+oqmNTVw8k6u3JAYJFkcu457uYz0wrED7Cai7Y6gUy7xwmY2SSY/r2mJJHEpSpZ
+NhiH47kZAgMBAAGjUDBOMB0GA1UdDgQWBBQ2hUX5Jdhn277SBisACnEABqg52zAf
+BgNVHSMEGDAWgBQ2hUX5Jdhn277SBisACnEABqg52zAMBgNVHRMEBTADAQH/MA0G
+CSqGSIb3DQEBBQUAA4IBAQBAVrkGGDPHDPQdZRgI1+1L87sX5xdNoet9sJUVRtz9
+ZwhGWAmca30cJGlhSFNx5y01E6T7lHDLrF9HCf9nVC10t0FwQwTVYijE8VyM7fAA
+4Hv/whSKg1kkQQSTis2ZW0wMU6TnanhJy6MrxwdhRampeXjNOpNtoLrF/5LbhWxO
+Gm0S5u+4q7eYnUPD4o3sb17idG62kkejHeToPnJwXtDwyq0XYNlL/OoqRaaY5f0b
+IKdeqqEkdtkzfU4N1dG7bJA29gBl48gPn+CSrh9u3D0s1OYM7MWi1/TjpwCR18ir
+CslVzO6kVNyQoNEYhZ9+2Sz0ceZVrYDFFzp8qAF8qbZ7
+-----END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/certs/localhost.key
----------------------------------------------------------------------
diff --git a/systemvm/certs/localhost.key b/systemvm/certs/localhost.key
new file mode 100644
index 0000000..6d95765
--- /dev/null
+++ b/systemvm/certs/localhost.key
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAm4bLUORp9oM65GV9XrPrbs+K563DjUR1M8mP1HaE+Y4lX5pk
+vQjC/xoEqSs5pxDDWXAkoexvxij8A4AWcsKU1Q+ep2E+GcytBoz8XINGvgb8cQNn
+rENv5BQb7XXGdUzRMbY3TqsrIytCLTOlNvPdcG5/mPaB6qKEwNLmmRC06XvzAoNn
+gcewOPrtup6Lxx3zmihBKrQbHKQz/NPp0HbjUH+tYWlduS79gg6qwiLr/xazZoEI
+XFIPHtXRZJOFQrH5RA7kmIfT6Wg+ybfqKpjU1cPJOrtyQGCRZHLuOe7mM9MKxA+w
+mou2OoFMu8cJmNkkmP69piSRxKUqWTYYh+O5GQIDAQABAoIBAQCI5S8VNtimaYBv
+BX5C26+BzCECKIsWT4myWdrGMsR9PUdcTXQaiBnLncU4epm2miS5FuLHvGvuSqj5
+E8eun+ONXsBRqGCXKPer6nE/pTWhklilyU9566oTYjfq3l4fZcxFK5SnJDdGL4+C
+ZhEou6LQkhKyO1jDhOXBLGJZnMEBOf+zXhgZGLDbQwCcCQ5PAZUiSf0cnVRk3rI9
+GwdsbCDNJk6awy8ANlFATemDvHwHZ7ZwmvVzsjsYlYJbY/vJYlOyxa7tzYROVAlm
+m8oiPfDvGjnXcGxVQwT0pgDvwtUkUFijZORpkJOPavxqSkpOzDFrOe9UW6HJYGzH
+ujhmZBVhAoGBAMnbfssRwYI5egfsxNbA62NkxRcGe5HIlnyZ1Ln0BCE8ae60frcf
+4IluZzT53Ly3jUQP2uGdp6nJVq/5ymRYSySNr46DXek2qcJ2TMbtRBhjebPwi+Rb
+qTNjccNSgqs0j+1qP78PoTUO5fUWGL9XqIlfPU6Vji4+SmdNMvz6z84lAoGBAMU9
+/3l2WVXykD6FNrRbtvpzU1C9LDixOaVVpGnZHO8krW440LnhIZJbkXnXDVZXc7eI
+D/doecfL8rtFteqeBr0LiXGQXU5mIMjXAOAPSvDqIciYzhL8KOK5CWEgVZo6RQlU
+G3ne0mk93I+w8N0SE2VKeuxepz4yw0oiKUpAgWrlAoGAS06qNRSAvxa2YjKBFSWQ
+K9qydO6kNzVAf2fcpytURxoE41tPUv5/hIY91tPI+Fb6SwQnQrjQjlVhE/H7Agi2
+sAJ0FpUH+jO8jaIY7rYiC39BLlJ1vlI8A8H79UTZHwpTD93tvlgUankObas6vFf1
+tppjgufkzXfLxlJUzXC9CkkCgYA7gy9YOKtP0XZQRuVwmdOl0bIrxEhZeq/IAQUw
+or+mMEzb2uyviQwWGubT+l0d1hkmITmgDrff3tuIQcpX1gJ2e8qmp0Zf51SxBJ5Q
+/IxCEILNAb374HV9oxL/aUAq3rYB0IzRwrd95ZptCJhEO7X6c/SO6ShRDgP6lEAd
+FUV3OQKBgQCFC0Xx/fCX1yquARgoe5pbK7IpXWaTvjBu//gbHsfR2lk3dZbESdeg
+OquPDdfp+jFPGISsDhPLzcfkZIPbz5ZVs8KdmpB/YLwyJwFqjDyjwVaDnRnuycb1
+/4PlVWKp7j5SDDNCfleYvmiRn8k6P4mxVJOHKzwb/IwQcKghyqAF1w==
+-----END RSA PRIVATE KEY-----

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/certs/realhostip.crt
----------------------------------------------------------------------
diff --git a/systemvm/certs/realhostip.crt b/systemvm/certs/realhostip.crt
new file mode 100644
index 0000000..7520b0c
--- /dev/null
+++ b/systemvm/certs/realhostip.crt
@@ -0,0 +1,31 @@
+-----BEGIN CERTIFICATE-----
+MIIFZTCCBE2gAwIBAgIHKBCduBUoKDANBgkqhkiG9w0BAQUFADCByjELMAkGA1UE
+BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY
+BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMTMwMQYDVQQLEypodHRwOi8vY2VydGlm
+aWNhdGVzLmdvZGFkZHkuY29tL3JlcG9zaXRvcnkxMDAuBgNVBAMTJ0dvIERhZGR5
+IFNlY3VyZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTERMA8GA1UEBRMIMDc5Njky
+ODcwHhcNMTIwMjAzMDMzMDQwWhcNMTcwMjA3MDUxMTIzWjBZMRkwFwYDVQQKDBAq
+LnJlYWxob3N0aXAuY29tMSEwHwYDVQQLDBhEb21haW4gQ29udHJvbCBWYWxpZGF0
+ZWQxGTAXBgNVBAMMECoucmVhbGhvc3RpcC5jb20wggEiMA0GCSqGSIb3DQEBAQUA
+A4IBDwAwggEKAoIBAQCDT9AtEfs+s/I8QXp6rrCw0iNJ0+GgsybNHheU+JpL39LM
+TZykCrZhZnyDvwdxCoOfE38Sa32baHKNds+y2SHnMNsOkw8OcNucHEBX1FIpOBGp
+h9D6xC+umx9od6xMWETUv7j6h2u+WC3OhBM8fHCBqIiAol31/IkcqDxxsHlQ8S/o
+CfTlXJUY6Yn628OA1XijKdRnadV0hZ829cv/PZKljjwQUTyrd0KHQeksBH+YAYSo
+2JUl8ekNLsOi8/cPtfojnltzRI1GXi0ZONs8VnDzJ0a2gqZY+uxlz+CGbLnGnlN4
+j9cBpE+MfUE+35Dq121sTpsSgF85Mz+pVhn2S633AgMBAAGjggG+MIIBujAPBgNV
+HRMBAf8EBTADAQEAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAOBgNV
+HQ8BAf8EBAMCBaAwMwYDVR0fBCwwKjAooCagJIYiaHR0cDovL2NybC5nb2RhZGR5
+LmNvbS9nZHMxLTY0LmNybDBTBgNVHSAETDBKMEgGC2CGSAGG/W0BBxcBMDkwNwYI
+KwYBBQUHAgEWK2h0dHA6Ly9jZXJ0aWZpY2F0ZXMuZ29kYWRkeS5jb20vcmVwb3Np
+dG9yeS8wgYAGCCsGAQUFBwEBBHQwcjAkBggrBgEFBQcwAYYYaHR0cDovL29jc3Au
+Z29kYWRkeS5jb20vMEoGCCsGAQUFBzAChj5odHRwOi8vY2VydGlmaWNhdGVzLmdv
+ZGFkZHkuY29tL3JlcG9zaXRvcnkvZ2RfaW50ZXJtZWRpYXRlLmNydDAfBgNVHSME
+GDAWgBT9rGEyk2xF1uLuhV+auud2mWjM5zArBgNVHREEJDAighAqLnJlYWxob3N0
+aXAuY29tgg5yZWFsaG9zdGlwLmNvbTAdBgNVHQ4EFgQUZyJz9/QLy5TWIIscTXID
+E8Xk47YwDQYJKoZIhvcNAQEFBQADggEBAKiUV3KK16mP0NpS92fmQkCLqm+qUWyN
+BfBVgf9/M5pcT8EiTZlS5nAtzAE/eRpBeR3ubLlaAogj4rdH7YYVJcDDLLoB2qM3
+qeCHu8LFoblkb93UuFDWqRaVPmMlJRnhsRkL1oa2gM2hwQTkBDkP7w5FG1BELCgl
+gZI2ij2yxjge6pOEwSyZCzzbCcg9pN+dNrYyGEtB4k+BBnPA3N4r14CWbk+uxjrQ
+6j2Ip+b7wOc5IuMEMl8xwTyjuX3lsLbAZyFI9RCyofwA9NqIZ1GeB6Zd196rubQp
+93cmBqGGjZUs3wMrGlm7xdjlX6GQ9UvmvkMub9+lL99A5W50QgCmFeI=
+-----END CERTIFICATE-----

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/certs/realhostip.csr
----------------------------------------------------------------------
diff --git a/systemvm/certs/realhostip.csr b/systemvm/certs/realhostip.csr
new file mode 100644
index 0000000..61395c9
--- /dev/null
+++ b/systemvm/certs/realhostip.csr
@@ -0,0 +1,15 @@
+-----BEGIN NEW CERTIFICATE REQUEST-----
+MIICsDCCAZgCAQAwazELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRIwEAYDVQQHEwlDdXBlcnRp
+bm8xDjAMBgNVBAoTBVZNT3BzMRAwDgYDVQQLEwdVbmtub3duMRkwFwYDVQQDDBAqLnJlYWxob3N0
+aXAuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAg0/QLRH7PrPyPEF6eq6wsNIj
+SdPhoLMmzR4XlPiaS9/SzE2cpAq2YWZ8g78HcQqDnxN/Emt9m2hyjXbPstkh5zDbDpMPDnDbnBxA
+V9RSKTgRqYfQ+sQvrpsfaHesTFhE1L+4+odrvlgtzoQTPHxwgaiIgKJd9fyJHKg8cbB5UPEv6An0
+5VyVGOmJ+tvDgNV4oynUZ2nVdIWfNvXL/z2SpY48EFE8q3dCh0HpLAR/mAGEqNiVJfHpDS7DovP3
+D7X6I55bc0SNRl4tGTjbPFZw8ydGtoKmWPrsZc/ghmy5xp5TeI/XAaRPjH1BPt+Q6tdtbE6bEoBf
+OTM/qVYZ9kut9wIDAQABoAAwDQYJKoZIhvcNAQEFBQADggEBAF5lhhni9dW9MqSL2ixNbViPWpFS
+ecOggshYChJfZKrhsuZaDpumJ/+ebICS4zv/oxDwNLSmeAmydiaUQC9LFQEEwvPBYDTtTzwCrtwH
+yyFJQSm6pyeIBP/Bih/5hLW8JPm0bDbp5ldrHCDEgKQeeyQhyYOKFODkTuMLw+FLD+V86IVHxElL
+/urCRWyZEPwyMsgfsU6ywNX9XNShyk1uDHjFDE67sPhfw52ooxXrYQnBdTk+g0UXPbULzrCK/1kU
+fjRq347V9Fwi5NFyGADOaA+q6mtnlb1i3uH1n1YVUzevvpnIr3/RxPSYHB47Kj9iYKeDlYdTRHJy
+NpuvTfmQO2Y=
+-----END NEW CERTIFICATE REQUEST-----

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/certs/realhostip.key
----------------------------------------------------------------------
diff --git a/systemvm/certs/realhostip.key b/systemvm/certs/realhostip.key
new file mode 100644
index 0000000..53bdc86
--- /dev/null
+++ b/systemvm/certs/realhostip.key
@@ -0,0 +1,24 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCDT9AtEfs+s/I8QXp6rrCw0iNJ
+0+GgsybNHheU+JpL39LMTZykCrZhZnyDvwdxCoOfE38Sa32baHKNds+y2SHnMNsOkw8OcNucHEBX
+1FIpOBGph9D6xC+umx9od6xMWETUv7j6h2u+WC3OhBM8fHCBqIiAol31/IkcqDxxsHlQ8S/oCfTl
+XJUY6Yn628OA1XijKdRnadV0hZ829cv/PZKljjwQUTyrd0KHQeksBH+YAYSo2JUl8ekNLsOi8/cP
+tfojnltzRI1GXi0ZONs8VnDzJ0a2gqZY+uxlz+CGbLnGnlN4j9cBpE+MfUE+35Dq121sTpsSgF85
+Mz+pVhn2S633AgMBAAECggEAH/Szd9RxbVADenCA6wxKSa3KErRyq1YN8ksJeCKMAj0FIt0caruE
+qO11DebWW8cwQu1Otl/cYI6pmg24/BBldMrp9IELX/tNJo+lhPpRyGAxxC0eSXinFfoASb8d+jJd
+Bd1mmemM6fSxqRlxSP4LrzIhjhR1g2CiyYuTsiM9UtoVKGyHwe7KfFwirUOJo3Mr18zUVNm7YqY4
+IVhOSq59zkH3ULBlYq4bG50jpxa5mNSCZ7IpafPY/kE/CbR+FWNt30+rk69T+qb5abg6+XGm+OAm
+bnQ18yZEqX6nJLk7Ch0cfA5orGgrTMOrM71wK7tBBDQ308kOxDGebx6j0qD36QKBgQDTRDr8kuhA
+9sUyKr9vk2DQCMpNvEeiwI3JRMqmmxpNAtg01aJ3Ya57vX5Fc+zcuV87kP6FM1xgpHQvnw5LWo2J
+s7ANwQcP8ricEW5zkZhSjI4ssMeAubmsHOloGxmLFYZqwx0JI7CWViGTLMcUlqKblmHcjeQDeDfP
+P1TaCItFmwKBgQCfHZwVvIcaDs5vxVpZ4ftvflIrW8qq0uOVK6QIf9A/YTGhCXl2qxxTg2A6+0rg
+ZqI7zKzUDxIbVv0KlgCbpHDC9d5+sdtDB3wW2pimuJ3p1z4/RHb4n/lDwXCACZl1S5l24yXX2pFZ
+wdPCXmy5PYkHMssFLNhI24pprUIQs66M1QKBgQDQwjAjWisD3pRXESSfZRsaFkWJcM28hdbVFhPF
+c6gWhwQLmTp0CuL2RPXcPUPFi6sN2iWWi3zxxi9Eyz+9uBn6AsOpo56N5MME/LiOnETO9TKb+Ib6
+rQtKhjshcv3XkIqFPo2XdVvOAgglPO7vajX91iiXXuH7h7RmJud6l0y/lwKBgE+bi90gLuPtpoEr
+VzIDKz40ED5bNYHT80NNy0rpT7J2GVN9nwStRYXPBBVeZq7xCpgqpgmO5LtDAWULeZBlbHlOdBwl
+NhNKKl5wzdEUKwW0yBL1WSS5PQgWPwgARYP25/ggW22sj+49WIo1neXsEKPGWObk8e050f1fTt92
+Vo1lAoGAb1gCoyBCzvi7sqFxm4V5oapnJeiQQJFjhoYWqGa26rQ+AvXXNuBcigIeDXNJPctSF0Uc
+p11KbbCgiruBbckvM1vGsk6Sx4leRk+IFHRpJktFUek4o0eUg0shOsyyvyet48Dfg0a8FvcxROs0
+gD+IYds5doiob/hcm1hnNB/3vk4=
+-----END PRIVATE KEY-----
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/certs/realhostip.keystore
----------------------------------------------------------------------
diff --git a/systemvm/certs/realhostip.keystore b/systemvm/certs/realhostip.keystore
new file mode 100644
index 0000000..c8d54d4
Binary files /dev/null and b/systemvm/certs/realhostip.keystore differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/cloudpatch-descriptor.xml
----------------------------------------------------------------------
diff --git a/systemvm/cloudpatch-descriptor.xml b/systemvm/cloudpatch-descriptor.xml
new file mode 100644
index 0000000..4710b05
--- /dev/null
+++ b/systemvm/cloudpatch-descriptor.xml
@@ -0,0 +1,59 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+  <id>cloud-scripts</id>
+  <formats>
+    <format>tar.gz</format>
+  </formats>
+  <includeBaseDirectory>false</includeBaseDirectory>
+  <fileSets>
+    <fileSet>
+      <directory>../patches/systemvm/debian/config/</directory>
+      <outputDirectory></outputDirectory>
+      <directoryMode>555</directoryMode>
+      <fileMode>555</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>../patches/systemvm/debian/vpn/</directory>
+      <outputDirectory></outputDirectory>
+      <directoryMode>555</directoryMode>
+      <fileMode>555</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>../patches/systemvm/debian/xe/</directory>
+      <outputDirectory></outputDirectory>
+      <directoryMode>555</directoryMode>
+      <fileMode>555</fileMode>
+      <excludes>
+        <exclude>**/xe-*</exclude>
+        <exclude>**/xen-*</exclude>
+      </excludes>
+    </fileSet>
+    <fileSet>
+      <directory>../patches/systemvm/debian/xe/</directory>
+      <outputDirectory>usr/sbin</outputDirectory>
+      <directoryMode>555</directoryMode>
+      <fileMode>555</fileMode>
+      <includes>
+        <include>**/xe-*</include>
+        <include>**/xen-*</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</assembly>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf.dom0/agent.properties.in
----------------------------------------------------------------------
diff --git a/systemvm/conf.dom0/agent.properties.in b/systemvm/conf.dom0/agent.properties.in
new file mode 100644
index 0000000..1920481
--- /dev/null
+++ b/systemvm/conf.dom0/agent.properties.in
@@ -0,0 +1,46 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Sample configuration file for VMOPS console proxy
+
+instance=ConsoleProxy
+consoleproxy.httpListenPort=8002
+
+#resource= the java class, which agent load to execute
+resource=com.cloud.agent.resource.consoleproxy.ConsoleProxyResource
+
+#host= The IP address of management server
+host=localhost
+
+#port = The port management server listening on, default is 8250
+port=8250
+
+#pod= The pod, which agent belonged to
+pod=default
+
+#zone= The zone, which agent belonged to
+zone=default
+
+#private.network.device= the private nic device
+# if this is commented, it is autodetected on service startup
+# private.network.device=cloudbr0
+
+#public.network.device= the public nic device
+# if this is commented, it is autodetected on service startup
+# public.network.device=cloudbr0
+
+#guid= a GUID to identify the agent

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf.dom0/consoleproxy.properties.in
----------------------------------------------------------------------
diff --git a/systemvm/conf.dom0/consoleproxy.properties.in b/systemvm/conf.dom0/consoleproxy.properties.in
new file mode 100644
index 0000000..a3cddbc
--- /dev/null
+++ b/systemvm/conf.dom0/consoleproxy.properties.in
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+consoleproxy.tcpListenPort=0
+consoleproxy.httpListenPort=80
+consoleproxy.httpCmdListenPort=8001
+consoleproxy.jarDir=./applet/
+consoleproxy.viewerLinger=180
+consoleproxy.reconnectMaxRetry=5

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf.dom0/log4j-cloud.xml.in
----------------------------------------------------------------------
diff --git a/systemvm/conf.dom0/log4j-cloud.xml.in b/systemvm/conf.dom0/log4j-cloud.xml.in
new file mode 100644
index 0000000..dde844f
--- /dev/null
+++ b/systemvm/conf.dom0/log4j-cloud.xml.in
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.apache.log4j.rolling.RollingFileAppender">
+      <param name="Append" value="true"/>
+      <param name="Threshold" value="WARN"/>
+      <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
+        <param name="FileNamePattern" value="@CPLOG@.%d{yyyy-MM-dd}.gz"/>
+        <param name="ActiveFileName" value="@CPLOG@"/>
+      </rollingPolicy>
+      <layout class="org.apache.log4j.EnhancedPatternLayout">
+         <param name="ConversionPattern" value="%d{ISO8601} %-5p [%c{3}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+   
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="WARN"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %5p %c{1}:%L - %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="com.cloud.console.ConsoleCanvas">
+     <priority value="WARN"/>
+   </category>
+   
+   <category name="com.cloud.consoleproxy.ConsoleProxyAjaxImageHandler">
+     <priority value="WARN"/>
+   </category>
+   
+   <category name="com.cloud.consoleproxy.ConsoleProxyViwer">
+     <priority value="WARN"/>
+   </category>
+
+   <category name="com.cloud.consoleproxy">
+     <priority value="INFO"/>
+   </category>
+
+   <category name="com.cloud">
+     <priority value="DEBUG"/>
+   </category>
+   
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
+   </category>
+
+   <category name="org">
+      <priority value="INFO"/>
+   </category>
+   
+   <category name="net">
+     <priority value="INFO"/>
+   </category>
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <level value="INFO"/>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf/agent.properties
----------------------------------------------------------------------
diff --git a/systemvm/conf/agent.properties b/systemvm/conf/agent.properties
new file mode 100644
index 0000000..246cb1c
--- /dev/null
+++ b/systemvm/conf/agent.properties
@@ -0,0 +1,2 @@
+instance=ConsoleProxy
+resource=com.cloud.agent.resource.consoleproxy.ConsoleProxyResource

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf/consoleproxy.properties
----------------------------------------------------------------------
diff --git a/systemvm/conf/consoleproxy.properties b/systemvm/conf/consoleproxy.properties
new file mode 100644
index 0000000..bb452f5
--- /dev/null
+++ b/systemvm/conf/consoleproxy.properties
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+consoleproxy.tcpListenPort=0
+consoleproxy.httpListenPort=8088
+consoleproxy.httpCmdListenPort=8001
+consoleproxy.jarDir=./applet/
+consoleproxy.viewerLinger=180
+consoleproxy.reconnectMaxRetry=5

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf/environment.properties
----------------------------------------------------------------------
diff --git a/systemvm/conf/environment.properties b/systemvm/conf/environment.properties
new file mode 100644
index 0000000..269acad
--- /dev/null
+++ b/systemvm/conf/environment.properties
@@ -0,0 +1,2 @@
+paths.script=../../scripts/storage/secondary/
+paths.pid=.

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/conf/log4j-cloud.xml
----------------------------------------------------------------------
diff --git a/systemvm/conf/log4j-cloud.xml b/systemvm/conf/log4j-cloud.xml
new file mode 100644
index 0000000..2d1d361
--- /dev/null
+++ b/systemvm/conf/log4j-cloud.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+   <!-- A time/date based rolling appender -->
+   <appender name="FILE" class="org.apache.log4j.DailyRollingFileAppender">
+      <param name="File" value="${log.home}systemvm.log"/>
+      <param name="Append" value="true"/>
+      <param name="Threshold" value="DEBUG"/>
+
+      <!-- Rollover at midnight each day -->
+      <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d %-5p [%c{3}] (%t:%x) %m%n"/>
+      </layout>
+   </appender>
+   
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== -->
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="WARN"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %5p %c{1}:%L - %m%n"/>
+      </layout>
+   </appender>
+
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="com.cloud.console.ConsoleCanvas">
+     <priority value="WARN"/>
+   </category>
+   
+   <category name="com.cloud.consoleproxy.ConsoleProxyAjaxImageHandler">
+     <priority value="WARN"/>
+   </category>
+   
+   <category name="com.cloud.consoleproxy.ConsoleProxyViewer">
+     <priority value="WARN"/>
+   </category>
+
+   <category name="com.cloud.consoleproxy">
+     <priority value="INFO"/>
+   </category>
+
+   <category name="com.cloud">
+     <priority value="DEBUG"/>
+   </category>
+   
+   <!-- Limit the org.apache category to INFO as its DEBUG is verbose -->
+   <category name="org.apache">
+      <priority value="INFO"/>
+   </category>
+
+   <category name="org">
+      <priority value="INFO"/>
+   </category>
+   
+   <category name="net">
+     <priority value="INFO"/>
+   </category>
+
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <level value="INFO"/>
+      <appender-ref ref="CONSOLE"/>
+      <appender-ref ref="FILE"/>
+   </root>
+
+</log4j:configuration>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/css/ajaxviewer.css
----------------------------------------------------------------------
diff --git a/systemvm/css/ajaxviewer.css b/systemvm/css/ajaxviewer.css
new file mode 100644
index 0000000..fd2fb3c
--- /dev/null
+++ b/systemvm/css/ajaxviewer.css
@@ -0,0 +1,144 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+body {
+	margin:0 0;
+	text-align: center;
+}
+	
+#main_panel {
+	clear:both;
+	margin: 0 auto;
+	text-align: left;
+}
+
+.canvas_tile {
+	cursor:crosshair;
+}
+
+#toolbar {
+	font:normal 12px 'Trebuchet MS','Arial'; 
+	margin:0 auto; 
+	text-align: left;
+	padding:0 0; 
+	height:32px;
+	background-image:url(/resource/images/back.gif); 
+	background-repeat:repeat-x; 
+}
+
+#toolbar ul { 
+	margin:0 0; 
+	padding:0 10px 0 10px; 
+	float:left;
+	display:block;
+	line-height:32px;
+	list-style:none; 
+}
+
+#toolbar li {
+	float:left; 
+	display:inline; 
+	padding:0;
+	height:32px;
+}
+
+#toolbar a { 
+	color:white; 
+	float:left;
+	display:block;
+	padding:0 3px 0 3px; 
+	text-decoration:none;
+	line-height:32px;
+}
+
+#toolbar a span { 
+	display:block; 
+	float:none; 
+	padding:0 10px 0 7px; 
+} 
+
+#toolbar a span img { 
+	border:none; 
+	margin:8px 4px 0 0; 
+} 
+
+#toolbar a:hover { 
+	background: url(/resource/images/left.png) no-repeat left center; 
+} 
+
+#toolbar a:hover span { 
+	background:url(/resource/images/right.png) no-repeat right center; 
+}
+
+
+#toolbar ul li ul {
+    position: absolute;
+    top:32;
+    width: 260;
+    height: 95;
+    display: block;
+    display: none;
+    border-top: 1px solid black;
+    background-image:url(/resource/images/back.gif);
+    background-repeat:repeat-x repeat-y;
+}
+
+#toolbar ul li ul li {
+    display: list-item;
+    float:none;
+    padding-left: 20;
+}
+
+#toolbar ul li ul li.current {
+    background: url(/resource/images/cad.gif) no-repeat left center; 
+}
+
+#toolbar ul li ul li a {
+    display:block;
+    padding:0 3px 0 3px; 
+    text-decoration:none;
+    line-height:32px;
+    vertical-align: bottom;    /* this is to fix the list gap in IE */
+}
+
+#toolbar ul li ul li a:hover {
+    background: url(/resource/images/left.png) no-repeat left center; 
+}
+
+#toolbar ul li ul li a:hover span {
+    background: url(/resource/images/right2.png) no-repeat right center; 
+}
+
+span.dark {
+	margin-right:20px;
+	float:right;
+	display:block;
+	width:32px;
+	height:30px;
+	background:url(/resource/images/gray-green.png) no-repeat center center; 
+}
+
+span.bright {
+	margin-right:20px;
+	float:right;
+	display:block;
+	width:32px;
+	height:30px;
+	background:url(/resource/images/bright-green.png) no-repeat center center; 
+}

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/css/logger.css
----------------------------------------------------------------------
diff --git a/systemvm/css/logger.css b/systemvm/css/logger.css
new file mode 100644
index 0000000..42ac807
--- /dev/null
+++ b/systemvm/css/logger.css
@@ -0,0 +1,139 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+*/
+
+@charset "UTF-8";
+.logwin {
+      position: absolute;
+
+      z-index:2147483648;
+      width: 800px;
+      border: 1px solid gray;
+      background: white;
+      text-align: left;
+}
+
+.logwin_title{
+	width:auto;
+	  height: 23px;
+	  background:url(../images/grid_headerbg.gif) repeat-x top left;
+	  border: 1px sold #737373;
+}
+
+.logwin_title_actionbox{
+	width:175px;
+	height:16px;
+	float:left;
+	margin:4px 0 0 7px;
+	display:inline;
+}
+
+
+.logwin_title_actionbox .select {
+	background: #424242; 
+	font: normal 10px Arial, Helvetica, sans-serif; 
+	float:left; 
+	border: 1px solid #6e6e6e; 
+	height: 16px; 
+	width: 100px; 
+	margin-left:3px; 
+	padding:0 0 0 3px; 
+	color:#CCC;
+}
+
+.logwin_title_rgtactionbox{
+	width:49px;
+	height:15px;
+	float:right;
+	margin:4px 0 0 7px;
+	display:inline;
+}
+
+
+a.logwin_playbutton {
+	width:18px;
+	height:15px;
+	float:left;
+	background:url(../images/play_button.gif) no-repeat top left;
+	margin-right:2px;
+	padding:0;
+}
+
+a:hover.logwin_playbutton {
+	background:url(../images/play_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_stopbutton {
+	width:18px;
+	height:15px;
+	float:left;
+	background:url(../images/stop_button.gif) no-repeat top left;
+	margin-right:2px;
+	padding:0;
+}
+
+a:hover.logwin_stopbutton {
+	background:url(../images/stop_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_clrbutton {
+	width:28px;
+	height:15px;
+	float:left;
+	background:url(../images/clr_button.gif) no-repeat top left;
+	margin:0;
+	padding:0;
+}
+
+a:hover.logwin_clrbutton {
+	background:url(../images/clr_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_shrinkbutton {
+	width:18px;
+	height:15px;
+	float:right;
+	background:url(../images/shrink_button.gif) no-repeat top left;
+	margin-right:7px;
+	margin-top:4px;
+	padding:0;
+}
+
+a:hover.logwin_shrinkbutton {
+	background:url(../images/shrink_button_hover.gif) no-repeat top left;
+}
+
+a.logwin_minimizebutton {
+	width:18px;
+	height:15px;
+	float:left;
+	background:url(../images/minimize_button.gif) no-repeat top left;
+	margin-right:2px;
+	padding:0;
+}
+
+a:hover.logwin_minimizebutton {
+	background:url(../images/minimize_button_hover.gif) no-repeat top left;
+}
+
+.logwin_content {
+    overflow:scroll;
+    height: 477px;
+    background: white;
+}
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in b/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
new file mode 100644
index 0000000..47fdaef
--- /dev/null
+++ b/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+# chkconfig: 35 99 10
+# description: Cloud Console Proxy
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well
+
+. /etc/rc.d/init.d/functions
+
+whatami=cloud-console-proxy
+
+# set environment variables
+
+SHORTNAME="$whatami"
+PIDFILE=@PIDDIR@/"$whatami".pid
+LOCKFILE=@LOCKDIR@/"$SHORTNAME"
+LOGFILE=@CPLOG@
+PROGNAME="Cloud Console Proxy"
+
+unset OPTIONS
+[ -r @SYSCONFDIR@/sysconfig/"$SHORTNAME" ] && source @SYSCONFDIR@/sysconfig/"$SHORTNAME"
+DAEMONIZE=@BINDIR@/@PACKAGE@-daemonize
+PROG=@LIBEXECDIR@/console-proxy-runner
+
+start() {
+        echo -n $"Starting $PROGNAME: "
+	if hostname --fqdn >/dev/null 2>&1 ; then
+		daemon --check=$SHORTNAME --pidfile=${PIDFILE} "$DAEMONIZE" \
+			-n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS
+		RETVAL=$?
+		echo
+	else
+		failure
+		echo
+		echo The host name does not resolve properly to an IP address.  Cannot start "$PROGNAME". > /dev/stderr
+		RETVAL=9
+	fi
+	[ $RETVAL = 0 ] && touch ${LOCKFILE}
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $PROGNAME: "
+	killproc -p ${PIDFILE} $SHORTNAME # -d 10 $SHORTNAME
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+        status -p ${PIDFILE} $SHORTNAME
+	RETVAL=$?
+	;;
+  restart)
+	stop
+	sleep 3
+	start
+	;;
+  condrestart)
+	if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then
+		stop
+		sleep 3
+		start
+	fi
+	;;
+  *)
+	echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
+	RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in b/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
new file mode 100644
index 0000000..47fdaef
--- /dev/null
+++ b/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+# chkconfig: 35 99 10
+# description: Cloud Console Proxy
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well
+
+. /etc/rc.d/init.d/functions
+
+whatami=cloud-console-proxy
+
+# set environment variables
+
+SHORTNAME="$whatami"
+PIDFILE=@PIDDIR@/"$whatami".pid
+LOCKFILE=@LOCKDIR@/"$SHORTNAME"
+LOGFILE=@CPLOG@
+PROGNAME="Cloud Console Proxy"
+
+unset OPTIONS
+[ -r @SYSCONFDIR@/sysconfig/"$SHORTNAME" ] && source @SYSCONFDIR@/sysconfig/"$SHORTNAME"
+DAEMONIZE=@BINDIR@/@PACKAGE@-daemonize
+PROG=@LIBEXECDIR@/console-proxy-runner
+
+start() {
+        echo -n $"Starting $PROGNAME: "
+	if hostname --fqdn >/dev/null 2>&1 ; then
+		daemon --check=$SHORTNAME --pidfile=${PIDFILE} "$DAEMONIZE" \
+			-n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS
+		RETVAL=$?
+		echo
+	else
+		failure
+		echo
+		echo The host name does not resolve properly to an IP address.  Cannot start "$PROGNAME". > /dev/stderr
+		RETVAL=9
+	fi
+	[ $RETVAL = 0 ] && touch ${LOCKFILE}
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $PROGNAME: "
+	killproc -p ${PIDFILE} $SHORTNAME # -d 10 $SHORTNAME
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+        status -p ${PIDFILE} $SHORTNAME
+	RETVAL=$?
+	;;
+  restart)
+	stop
+	sleep 3
+	start
+	;;
+  condrestart)
+	if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then
+		stop
+		sleep 3
+		start
+	fi
+	;;
+  *)
+	echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
+	RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in b/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
new file mode 100644
index 0000000..47fdaef
--- /dev/null
+++ b/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
@@ -0,0 +1,98 @@
+#!/bin/bash
+
+# chkconfig: 35 99 10
+# description: Cloud Console Proxy
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well
+
+. /etc/rc.d/init.d/functions
+
+whatami=cloud-console-proxy
+
+# set environment variables
+
+SHORTNAME="$whatami"
+PIDFILE=@PIDDIR@/"$whatami".pid
+LOCKFILE=@LOCKDIR@/"$SHORTNAME"
+LOGFILE=@CPLOG@
+PROGNAME="Cloud Console Proxy"
+
+unset OPTIONS
+[ -r @SYSCONFDIR@/sysconfig/"$SHORTNAME" ] && source @SYSCONFDIR@/sysconfig/"$SHORTNAME"
+DAEMONIZE=@BINDIR@/@PACKAGE@-daemonize
+PROG=@LIBEXECDIR@/console-proxy-runner
+
+start() {
+        echo -n $"Starting $PROGNAME: "
+	if hostname --fqdn >/dev/null 2>&1 ; then
+		daemon --check=$SHORTNAME --pidfile=${PIDFILE} "$DAEMONIZE" \
+			-n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS
+		RETVAL=$?
+		echo
+	else
+		failure
+		echo
+		echo The host name does not resolve properly to an IP address.  Cannot start "$PROGNAME". > /dev/stderr
+		RETVAL=9
+	fi
+	[ $RETVAL = 0 ] && touch ${LOCKFILE}
+	return $RETVAL
+}
+
+stop() {
+	echo -n $"Stopping $PROGNAME: "
+	killproc -p ${PIDFILE} $SHORTNAME # -d 10 $SHORTNAME
+	RETVAL=$?
+	echo
+	[ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE}
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+        status -p ${PIDFILE} $SHORTNAME
+	RETVAL=$?
+	;;
+  restart)
+	stop
+	sleep 3
+	start
+	;;
+  condrestart)
+	if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then
+		stop
+		sleep 3
+		start
+	fi
+	;;
+  *)
+	echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
+	RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in b/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
new file mode 100755
index 0000000..550f2fb
--- /dev/null
+++ b/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
@@ -0,0 +1,112 @@
+#!/bin/bash
+
+# chkconfig: 35 99 10
+# description: Cloud Console Proxy
+
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# WARNING: if this script is changed, then all other initscripts MUST BE changed to match it as well
+
+. /lib/lsb/init-functions
+. /etc/default/rcS
+
+whatami=cloud-console-proxy
+
+# set environment variables
+
+SHORTNAME="$whatami"
+PIDFILE=@PIDDIR@/"$whatami".pid
+LOCKFILE=@LOCKDIR@/"$SHORTNAME"
+LOGFILE=@CPLOG@
+PROGNAME="Cloud Console Proxy"
+
+unset OPTIONS
+[ -r @SYSCONFDIR@/default/"$SHORTNAME" ] && source @SYSCONFDIR@/default/"$SHORTNAME"
+DAEMONIZE=@BINDIR@/@PACKAGE@-daemonize
+PROG=@LIBEXECDIR@/console-proxy-runner
+
+start() {
+        log_daemon_msg $"Starting $PROGNAME" "$SHORTNAME"
+	if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+	      log_progress_msg "apparently already running"
+	      log_end_msg 0
+	      exit 0
+	fi
+	if hostname --fqdn >/dev/null 2>&1 ; then
+		true
+	else
+		log_failure_msg "The host name does not resolve properly to an IP address.  Cannot start $PROGNAME"
+		log_end_msg 1
+		exit 1
+	fi
+ 
+	if start-stop-daemon --start --quiet \
+		--pidfile "$PIDFILE" \
+		--exec "$DAEMONIZE" -- -n "$SHORTNAME" -p "$PIDFILE" -l "$LOGFILE" "$PROG" $OPTIONS
+		RETVAL=$?
+	    then
+		rc=0
+		sleep 1
+		if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then
+		    log_failure_msg "$PROG failed to start"
+		    rc=1
+		fi
+	else
+		rc=1
+	fi
+
+	if [ $rc -eq 0 ]; then
+		log_end_msg 0
+	else
+		log_end_msg 1
+		rm -f "$PIDFILE"
+	fi
+}
+
+stop() {
+	echo -n $"Stopping $PROGNAME" "$SHORTNAME"
+	start-stop-daemon --stop --quiet --oknodo --pidfile "$PIDFILE"
+	log_end_msg $?
+	rm -f "$PIDFILE"
+}
+
+
+# See how we were called.
+case "$1" in
+  start)
+	start
+	;;
+  stop)
+	stop
+	;;
+  status)
+        status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME"
+	RETVAL=$?
+	;;
+  restart)
+	stop
+	sleep 3
+	start
+	;;
+  *)
+	echo $"Usage: $whatami {start|stop|restart|status|help}"
+	RETVAL=3
+esac
+
+exit $RETVAL
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/back.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/back.gif b/systemvm/images/back.gif
new file mode 100644
index 0000000..5c61ae2
Binary files /dev/null and b/systemvm/images/back.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/bright-green.png
----------------------------------------------------------------------
diff --git a/systemvm/images/bright-green.png b/systemvm/images/bright-green.png
new file mode 100644
index 0000000..685dfc1
Binary files /dev/null and b/systemvm/images/bright-green.png differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/cad.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/cad.gif b/systemvm/images/cad.gif
new file mode 100644
index 0000000..de34925
Binary files /dev/null and b/systemvm/images/cad.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/cannotconnect.jpg
----------------------------------------------------------------------
diff --git a/systemvm/images/cannotconnect.jpg b/systemvm/images/cannotconnect.jpg
new file mode 100644
index 0000000..0599f17
Binary files /dev/null and b/systemvm/images/cannotconnect.jpg differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/clr_button.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/clr_button.gif b/systemvm/images/clr_button.gif
new file mode 100644
index 0000000..f5c3858
Binary files /dev/null and b/systemvm/images/clr_button.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/clr_button_hover.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/clr_button_hover.gif b/systemvm/images/clr_button_hover.gif
new file mode 100644
index 0000000..f882fa0
Binary files /dev/null and b/systemvm/images/clr_button_hover.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/dot.cur
----------------------------------------------------------------------
diff --git a/systemvm/images/dot.cur b/systemvm/images/dot.cur
new file mode 100644
index 0000000..1721801
Binary files /dev/null and b/systemvm/images/dot.cur differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/gray-green.png
----------------------------------------------------------------------
diff --git a/systemvm/images/gray-green.png b/systemvm/images/gray-green.png
new file mode 100644
index 0000000..e785a63
Binary files /dev/null and b/systemvm/images/gray-green.png differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/grid_headerbg.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/grid_headerbg.gif b/systemvm/images/grid_headerbg.gif
new file mode 100644
index 0000000..5a0f72b
Binary files /dev/null and b/systemvm/images/grid_headerbg.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/left.png
----------------------------------------------------------------------
diff --git a/systemvm/images/left.png b/systemvm/images/left.png
new file mode 100644
index 0000000..fb75066
Binary files /dev/null and b/systemvm/images/left.png differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/minimize_button.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/minimize_button.gif b/systemvm/images/minimize_button.gif
new file mode 100644
index 0000000..a4e2e26
Binary files /dev/null and b/systemvm/images/minimize_button.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/minimize_button_hover.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/minimize_button_hover.gif b/systemvm/images/minimize_button_hover.gif
new file mode 100644
index 0000000..7837ed0
Binary files /dev/null and b/systemvm/images/minimize_button_hover.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/notready.jpg
----------------------------------------------------------------------
diff --git a/systemvm/images/notready.jpg b/systemvm/images/notready.jpg
new file mode 100644
index 0000000..406599c
Binary files /dev/null and b/systemvm/images/notready.jpg differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/play_button.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/play_button.gif b/systemvm/images/play_button.gif
new file mode 100644
index 0000000..6f48308
Binary files /dev/null and b/systemvm/images/play_button.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/play_button_hover.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/play_button_hover.gif b/systemvm/images/play_button_hover.gif
new file mode 100644
index 0000000..6689e3e
Binary files /dev/null and b/systemvm/images/play_button_hover.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/right.png
----------------------------------------------------------------------
diff --git a/systemvm/images/right.png b/systemvm/images/right.png
new file mode 100644
index 0000000..4abac81
Binary files /dev/null and b/systemvm/images/right.png differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/right2.png
----------------------------------------------------------------------
diff --git a/systemvm/images/right2.png b/systemvm/images/right2.png
new file mode 100644
index 0000000..cca9379
Binary files /dev/null and b/systemvm/images/right2.png differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/shrink_button.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/shrink_button.gif b/systemvm/images/shrink_button.gif
new file mode 100644
index 0000000..834625a
Binary files /dev/null and b/systemvm/images/shrink_button.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/shrink_button_hover.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/shrink_button_hover.gif b/systemvm/images/shrink_button_hover.gif
new file mode 100644
index 0000000..eed9cec
Binary files /dev/null and b/systemvm/images/shrink_button_hover.gif differ

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c261042/systemvm/images/stop_button.gif
----------------------------------------------------------------------
diff --git a/systemvm/images/stop_button.gif b/systemvm/images/stop_button.gif
new file mode 100644
index 0000000..bfec9c6
Binary files /dev/null and b/systemvm/images/stop_button.gif differ


Mime
View raw message