Skip to content

Instantly share code, notes, and snippets.

@jonahbron
Created October 18, 2013 19:11
Show Gist options
  • Save jonahbron/7046566 to your computer and use it in GitHub Desktop.
Save jonahbron/7046566 to your computer and use it in GitHub Desktop.
Upgrade Vagrant Boxes to 1.1
#!/bin/bash
provider=virtualbox
# Loop over boxes
for box in ~/.vagrant.d/boxes/*; do
# Create provider directory to contain files
mkdir $box/$provider/
# Move all provider files into provider directory
mv $box/box-*.vmdk $box/box.ovf $box/Vagrantfile $box/$provider/
# Create provider metadata file
echo "{\"provider\":\"$provider\"}" > $box/$provider/metadata.json
echo Fixed box $(basename $box)
done
@ramnes
Copy link

ramnes commented Jan 10, 2014

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment