-
-
Save davidino/296161a19b620a77c46a to your computer and use it in GitHub Desktop.
simple vm management script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$vmFile" ] | |
then | |
echo "please set your 'vmFile' environment variable to point to your vm's .vmx file" | |
exit 1 | |
fi | |
case "$1" in | |
start) | |
vmrun start "$vmFile" nogui | |
;; | |
stop) | |
vmrun stop "$vmFile" nogui | |
;; | |
suspend) | |
vmrun suspend "$vmFile" nogui | |
;; | |
pause) | |
vmrun pause "$vmFile" nogui | |
;; | |
unpause) | |
vmrun unpause "$vmFile" nogui | |
;; | |
reset) | |
vmrun reset "$vmFile" nogui | |
;; | |
status) | |
vmrun list | |
;; | |
*) | |
echo "Usage: possible options are: start | stop | suspend | pause | unpause | reset | status" | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment