Skip to content

Instantly share code, notes, and snippets.

@lloydroc
Created August 23, 2016 14:08
Show Gist options
  • Save lloydroc/79324f56eba76eab2de7456c02f10fd1 to your computer and use it in GitHub Desktop.
Save lloydroc/79324f56eba76eab2de7456c02f10fd1 to your computer and use it in GitHub Desktop.
Set up directory structure for VirtualBox to manage virtual machines on the host machine
#!/bin/sh
VB_BASE_LOC=$HOME/avm
VB_DLS_LOC=$VB_BASE_LOC/downloads
VB_DVD_LOC=$VB_BASE_LOC/dvd
VB_VMS_LOC=$VB_BASE_LOC/vms
VB_BIN_LOC=$VB_BASE_LOC/bin
VB_SHR_LOC=$VB_BASE_LOC/shares
VB_LOG_LOC=$VB_BASE_LOC/log
mkdir $VB_BASE_LOC
mkdir $VB_DLS_LOC
mkdir $VB_DVD_LOC
mkdir $VB_VMS_LOC
mkdir $VB_BIN_LOC
mkdir $VB_SHR_LOC
mkdir $VB_LOG_LOC
echo "Done Creating Directories"
echo "VB_BASE_LOC=$VB_BASE_LOC
VB_DLS_LOC=$VB_DLS_LOC
VB_DVD_LOC=$VB_DVD_LOC
VB_VMS_LOC=$VB_VMS_LOC
VB_BIN_LOC=$VB_BIN_LOC
VB_SHR_LOC=$VB_SHR_LOC
VB_LOG_LOC=$VB_LOG_LOC" > $HOME/.vbconfig
echo "Done creating ~/.vbconfig"
. ~/.vbconfig
VBoxManage setproperty machinefolder $VB_VMS_LOC
# Can confirm setproperty from here
# VBoxManage list systemproperties
exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment