bash script to start up a Virtual Box Image

[sourcecode language=”bash”]

#!/bin/bash

clear screen

if test -z "$1"
then
echo "This script will start a VBox image"
echo "Would you like to continue? "
echo "Enter yes or no"
read DOWHAT
if [[ $DOWHAT = no ]]; then
exit 1
fi
echo "#########################################################"
echo "What is the name of the VBox image you wish to start? >"
echo "#########################################################"
echo "VBox Images"
echo "Please enter the name of the image as it appears in the list:"
echo "#########################################################"
vboxmanage list vms
read VBox
vboxmanage startvm $VBox
else
vboxmanage startvm $1
fi
echo "#########################################################"
echo "Currently running VBox Images"
vboxmanage list runningvms

[/sourcecode]

Leave a Reply

Discover more from OraMatt: YABAOracle

Subscribe now to keep reading and get access to the full archive.

Continue reading