Created
August 1, 2011 11:09
-
-
Save siwells/1117944 to your computer and use it in GitHub Desktop.
A Bash script to check whether the network for a given VM is up and running. It will look for the VirtualBox reserved NAT IP (10.0.2.15). If found the VM is up & running, otherwise inform the user then sleep for 10 seconds before trying again.
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/bash | |
function checknet { | |
UP=$(VBoxManage guestproperty enumerate omero-vm | grep "10.0.2.15") | |
} | |
checknet | |
echo "UP :: " $UP | |
while [ -z "$UP" ] | |
do | |
checknet | |
echo "VM not fully up yet..." | |
echo "Sleeping for 10 seconds then trying again." | |
sleep 10 | |
done | |
echo "VM Running" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment