Skip to content

Instantly share code, notes, and snippets.

@cjcolvar
Last active December 28, 2015 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cjcolvar/7415481 to your computer and use it in GitHub Desktop.
Save cjcolvar/7415481 to your computer and use it in GitHub Desktop.
Bash script for creating avalon OVA
#!/bin/bash
vagrant up
VM_UUID=`VBoxManage list runningvms | grep -o '[0-9a-fA-F]\{8\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{12\}'`
HD_UUID=`VBoxManage list -l runningvms | grep "SATA.*UUID" | grep -o '[0-9a-fA-F]\{8\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{4\}-[0-9a-fA-F]\{12\}'`
vagrant halt
VM_DATE=`date +%y%m%d`
VBoxManage modifyhd ${HD_UUID} --compact
VBoxManage export ${VM_UUID} --output avalon-vm-${VM_DATE}.ova --product "Avalon Media System" --producturl http://www.avalonmediasystem.org --version R2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment