You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
1.6 KiB

  1. #!/bin/bash
  2. #
  3. BORDER="~~~~~~~~~~~~~~~~~~~~~~~~~~~"
  4. NUM_RUNNING=$(vboxmanage list runningvms | wc -l)
  5. echo Number of running vms: $NUM_RUNNING
  6. if [ $NUM_RUNNING -eq 6 ]
  7. then
  8. echo Sike all 6 vms already running
  9. else
  10. echo Bringing up all the VMs..
  11. printf "$BORDER Starting all 3 routers \n"
  12. printf "\n$BORDER Booting router 1 \n"
  13. vboxmanage startvm vague-router1 --type headless
  14. echo "$BORDER Finished booting router 1"
  15. printf "\n$BORDER Booting router 2 \n"
  16. vboxmanage startvm vague-router2 --type headless
  17. echo "$BORDER Finished booting router 2"
  18. printf "\n$BORDER Booting router 3 \n"
  19. vboxmanage startvm vague-router3 --type headless
  20. echo "$BORDER Finished booting router 3"
  21. printf "\n$BORDER Booting gateway \n"
  22. vboxmanage startvm vague-gateway --type headless
  23. printf "$BORDER Finished booting gateway\n\n"
  24. cd ../..
  25. sleep 1
  26. RUNNERS=$(vboxmanage list runningvms)
  27. echo "Current running VMs: $RUNNERS"
  28. printf "\n\n$BORDER Booting the 3 edge nodes .. \n"
  29. printf "\n$BORDER Booting the client \n"
  30. vboxmanage startvm vague-client --type headless
  31. echo "$BORDER Finished booting client.."
  32. printf "\n$BORDER Booting the vpn server \n"
  33. vboxmanage startvm vague-vpn-server --type headless
  34. echo "$BORDER Finished booting vpn server.."
  35. printf "\n$BORDER Booting the web server \n"
  36. vboxmanage startvm vague-web-server --type headless
  37. printf "\n\n$BORDER Checking current VM status..\n\n"
  38. RUNNERS=$(vboxmanage list runningvms)
  39. echo "Current running VMs: $RUNNERS"
  40. fi