Skip to content

Instantly share code, notes, and snippets.

@BlackMaria
Last active December 18, 2015 18:19
Show Gist options
  • Save BlackMaria/5824836 to your computer and use it in GitHub Desktop.
Save BlackMaria/5824836 to your computer and use it in GitHub Desktop.
It seems that installing the latest version of Vagrant breaks the old config.
[originally posted in 2013] It seems that installing the latest version of Vagrant breaks the old config.
If there is something I hate, it is code that is not backward compatible AND breaks OLD configs at the same time.
...That is to say, I installed the NEW vagrant and was told my boxes were build for OLD vagrant.
So ( being in a rush) I reinstalled the old vagrant and that complained that I had a NEW vagrant config and refused to work.
Meaning once you install the NEW vagrant your old config is broken so you must fix it...
Well, this is the thing I did. Anyway, were would I be without vagrant! So thanks just the same
#!/bin/sh
# See me bitch https://github.com/BlackMaria/BlackBitching/wiki/Vagrant-1.0.7-to-1.1.x-bugs
#
# This is an ungly desparate hack to get 1.0.x Vagrant boxes working with > 1.1.X
#
for i in ~/.vagrant.d/boxes/*
do
cd $i &&
if (! test -d virtualbox) ; then
mkdir virtualbox
mv * virtualbox
[ -f virtualbox/metadata.json ] || echo '{"provider":"virtualbox"}' > virtualbox/metadata.json
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment