Created
December 26, 2016 06:17
-
-
Save samba/2786e7f2d21ddac1d9a4c66b9df51a31 to your computer and use it in GitHub Desktop.
VirtualBox Snapshot Kit
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 | |
export MACHINE_NAME="test machine" | |
export DATE=`date +"%Y-%m-%d %H:%M:%S"` | |
take_snapshot () { | |
while read vmuuid; do | |
VBoxManage snapshot "${vmuuid}" take "Snapshot ${DATE}" | |
done | |
} | |
# List machines | |
VBoxManage list vms | grep "${MACHINE_NAME}" | grep -oE '\{[a-z0-9-]+\}' | take_snapshot | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment