install ONOS
diff --git a/vm-setup-lxc.sh b/vm-setup-lxc.sh
index 833e538..e1e8c35 100644
--- a/vm-setup-lxc.sh
+++ b/vm-setup-lxc.sh
@@ -13,10 +13,17 @@
 sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
 sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac
 
+# -------------- Setup keys -------------------
+
+mkdir -p ~/.ssh
+ssh-keygen -t rsa -P "" -f .ssh/id_rsa  
+#cp .ssh/id_rsa.pub .ssh/authorized_keys
+
+# -------------- Setup 3-node LXC cluster ----------------
+
 sudo lxc-create --name onos1 -t download -- --dist ubuntu --release utopic --arch amd64
 
-#sudo sh -c "echo lxc.network.ipv4=10.0.3.11 >> /var/lib/lxc/onos1/config"
-#sudo sh -c "echo lxc.start.auto=1 >> /var/lib/lxc/onos1/config"
+sudo sh -c "echo lxc.start.auto=1 >> /var/lib/lxc/onos1/config"
 
 sudo sh -c "sed -i s/dhcp/static/ /var/lib/lxc/onos1/rootfs/etc/network/interfaces"
 sudo sh -c "cat << EOF >> /var/lib/lxc/onos1/rootfs/etc/network/interfaces
@@ -26,21 +33,69 @@
 	dns-nameservers 10.0.3.1
 EOF"
 
-sudo sh -c "cat /var/lib/lxc/onos1/rootfs/etc/network/interfaces"
-
 sudo lxc-start --name onos1 --daemon
+
 sudo lxc-ls --fancy
-sleep 10
+sleep 5
 sudo lxc-ls --fancy
 sudo lxc-attach --name onos1 -- ip a
-sudo lxc-attach --name onos1 -- ping -c3 www.google.com
+
 sudo lxc-attach --name onos1 -- useradd -m sdn -s /bin/bash
 sudo lxc-attach --name onos1 -- /bin/bash -c "echo sdn:rocks | chpasswd"
 sudo lxc-attach --name onos1 -- /bin/bash -c "echo \"sdn ALL=(ALL) NOPASSWD:ALL\" > /etc/sudoers.d/sdn"
 sudo lxc-attach --name onos1 -- apt-get update
-sudo lxc-attach --name onos1 -- apt-get install -y openssh-server openjdk-8-jdk
-#sudo lxc-attach --name onos1 -- apt-get install software-properties-common -y
-#sudo lxc-attach --name onos1 -- add-apt-repository ppa:webupd8team/java -y
-#sudo lxc-attach --name onos1 -- apt-get update
-#sudo lxc-attach --name onos1 -- apt-get install oracle-java8-installer oracle-java8-set-default -y
+sudo lxc-attach --name onos1 -- apt-get install -y openssh-server openjdk-8-jre-headless
+
 sudo lxc-stop --name onos1
+
+mkdir -p /var/lib/lxc/onos1/rootfs/home/sdn/.ssh
+sudo cp ~/.ssh/id_rsa.pub /var/lib/lxc/onos1/rootfs/home/sdn/.ssh/authorized_keys
+sudo chmod 666 /var/lib/lxc/onos1/rootfs/home/sdn/.ssh/authorized_keys
+
+sudo lxc-clone onos1 onos2
+sudo sh -c "sed -i s/10.0.3.11/10.0.3.12 /var/lib/lxc/onos2/rootfs/etc/network/interfaces"
+
+sudo lxc-clone onos1 onos3
+sudo sh -c "sed -i s/10.0.3.11/10.0.3.13 /var/lib/lxc/onos3/rootfs/etc/network/interfaces"
+
+sudo lxc-start --name onos1
+sudo lxc-start --name onos2
+sudo lxc-start --name onos3
+
+sleep 5
+
+sudo lxc-ls --fancy
+
+# -------------- Install ONOS ----------------
+
+USER=mininet
+USER_HOME=/home/${USER}
+
+cd ~
+git clone https://gerrit.onosproject.org/onos
+cd onos && git checkout 1.1.0 && cd -
+
+echo $JAVA_HOME
+export JAVA_HOME=""
+cd $ONOS_ROOT && mvn clean install && mvn dependency:go-offline && cd -
+
+cat << EOF >> onos/tools/test/cells/tutorial
+export ONOS_NIC=10.0.3.*
+export OC1="10.0.3.11"
+export OC1="10.0.3.12"
+export OC1="10.0.3.13"
+export OCI="${OC1}"
+export ONOS_FEATURES="webconsole,onos-rest,onos-gui,onos-api,onos-core,onos-cli,onos-openflow"
+export ONOS_USER="sdn"
+EOF
+
+cell tutorial
+
+onos-package
+onos-group install -f
+onos-wait-for-start $OC1
+onos-wait-for-start $OC2
+onos-wait-for-start $OC3
+
+sleep 20
+onos 1 "nodes"
\ No newline at end of file