Created
August 27, 2015 15:46
-
-
Save lattera/a3d5850e1415767e18e4 to your computer and use it in GitHub Desktop.
Mass export VirtualBox VMs
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/zsh | |
set -e | |
vms=("Jenkins" "GitLab" "Test VM") | |
date=$(date '+%F') | |
if [ ! -d ${date} ]; then | |
mkdir -p exports/${date} | |
fi | |
foreach vm in ${vms}; do | |
echo -n "Exporting ${vm}: " | |
VBoxManage export "${vm}" -o exports/${date}/${vm// /_}.ova | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment