Advertisement
Guest User

Untitled

a guest
Jul 25th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. #!/bin/bash -epu
  2.  
  3. VMID=$(cat vbox/state.json | jq -r .current_vm_cid)
  4. if [[ -z "$VMID" ]]; then
  5. echo "unknown VM ID" >&2
  6. exit 1
  7. fi
  8.  
  9. case $1 in
  10. start)
  11. echo -n "Starting Bosh Lite VM... "
  12. vboxmanage startvm "$VMID" --type=headless
  13. echo "Done!"
  14. ;;
  15. stop)
  16. echo -n "Stopping Bosh Lite VM... "
  17. vboxmanage controlvm "$VMID" savestate
  18. echo "Done!"
  19. ;;
  20. *)
  21. echo "usage: $0 <start|stop>" >&2
  22. exit 1
  23. esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement