diff --git a/Lab1/BlinkTask/Makefile b/Lab1/BlinkTask/Makefile
index c8f802faad46c8a13a8e3c094a4c00a04fe28405..0150545638f6956b1f852d42d07f424801ac631e 100644
--- a/Lab1/BlinkTask/Makefile
+++ b/Lab1/BlinkTask/Makefile
@@ -1,5 +1,4 @@
 COMPONENT=BlinkTaskAppC
-TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main
 include $(TINYOS_ROOT_DIR)/Makefile.include
 
 
diff --git a/Lab1/PhotoMeter/Makefile b/Lab1/PhotoMeter/Makefile
index 7058eb5f71ba275e1b1247c792069c0481dd9d13..045c8ed5a831048bc3f139d8e2cecdb6b02f60c0 100644
--- a/Lab1/PhotoMeter/Makefile
+++ b/Lab1/PhotoMeter/Makefile
@@ -1,5 +1,4 @@
 COMPONENT=PhotoMeterAppC
-TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main
 
 CFLAGS += -I$(TINYOS_ROOT_DIR)/tos/lib/printf
 include $(TINYOS_ROOT_DIR)/Makefile.include
diff --git a/Lab2/TrafficLight/Makefile b/Lab2/TrafficLight/Makefile
index 863c279f93dd9018b2b29c68b23976c30739c24a..295bb6861424198e3886af7f55b19c4166bd1bc0 100644
--- a/Lab2/TrafficLight/Makefile
+++ b/Lab2/TrafficLight/Makefile
@@ -1,5 +1,5 @@
 COMPONENT=TrafficLightAppC
-TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main
+
 CFLAGS += -I$(TINYOS_ROOT_DIR)/tos/lib/printf
 
 PFLAGS = -DCC2420_DEF_CHANNEL=26
diff --git a/Lab3/EnergyLPL/Makefile b/Lab3/EnergyLPL/Makefile
index 5b76c892aca5aa7b6222451bfae7aecc746221c2..600799b4f2a845fe00359e11031e106f6eac4847 100644
--- a/Lab3/EnergyLPL/Makefile
+++ b/Lab3/EnergyLPL/Makefile
@@ -1,5 +1,4 @@
 COMPONENT=EnergyLPLAppC
-TINYOS_ROOT_DIR?=/courses/TDDI07/tinyos-main
 
 CFLAGS += -I$(TINYOS_ROOT_DIR)/tos/lib/printf
 CFLAGS += -DLOW_POWER_LISTENING
diff --git a/TDDI07-settings.sh b/TDDI07-settings.sh
index 7a923954397778273cc68a9f21e8bf6343281591..237dba2c9b5eca2c42d0d74b6a20866cfd2693a9 100644
--- a/TDDI07-settings.sh
+++ b/TDDI07-settings.sh
@@ -1,2 +1,3 @@
+export TINYOS_ROOT_DIR=/courses/TDDI07/tinyos-main
 export PATH=$PATH:/courses/TDDI07/tinyos-tools/bin
 export CLASSPATH=/courses/TDDI07/tinyos-tools/lib/java/tinyos.jar:.
diff --git a/setup-on-vm.sh b/setup-on-vm.sh
new file mode 100644
index 0000000000000000000000000000000000000000..7aca28cbd3e371de69011db06a3c40f005c3634b
--- /dev/null
+++ b/setup-on-vm.sh
@@ -0,0 +1,19 @@
+#Note the current version of tinyos tools is not compatible with Java v. 14 and higher
+sudo apt install build-essential python2.7 python-dev gcc-msp430 autoconf java-common openjdk-13-jdk emacs gperf bison flex
+
+wget https://www.ida.liu.se/~TDDI07/labs/files/tinyos-main.zip
+unzip tinyos-main.zip
+
+git clone https://github.com/tinyos/nesc
+cd nesc
+./Bootstrap
+./configure
+make
+sudo make install
+cd ..
+
+cd tinyos-main/tools
+./Bootstrap
+./configure
+make
+sudo make install
diff --git a/vm-settings.sh b/vm-settings.sh
new file mode 100644
index 0000000000000000000000000000000000000000..ff94cc24c1e11db63ae99698310d54a2c614eab1
--- /dev/null
+++ b/vm-settings.sh
@@ -0,0 +1,2 @@
+export TINYOS_ROOT_DIR=$HOME/tinyos-lab/tinyos-main
+export CLASSPATH=$HOME/tinyos-lab/tinyos-main/tools/lib/java/tinyos.jar:.