Running vagrant up
after upgrading Virtualbox to 4.24 (or something) now gives this error:
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The box 'precise64-customized-sk' could not be found.
Fix:
mkdir ~/.vagrant.d/boxes/precise64-customized-sk/virtualbox/
echo '{"provider":"virtualbox"}' > ~/.vagrant.d/boxes/precise64-customized-sk/virtualbox/metadata.json
Source:
- hashicorp/vagrant#1624
- hashicorp/vagrant#1691 (not encountered, but potentially related)
Later on, we saw this error when running VAGRANT_LOG=INFO vagrant up
Command: ["import", "/Users/suzanne/.vagrant.d/boxes/precise64-customized-sk/virtualbox/box.ovf"]
Stderr: 0%...
Progress state: VBOX_E_FILE_ERROR
VBoxManage: error: Appliance read failed
VBoxManage: error: Could not read OVF file 'box.ovf' (VERR_FILE_NOT_FOUND)
VBoxManage: error: Details: code VBOX_E_FILE_ERROR (0x80bb0004), component Appliance, interface IAppliance
VBoxManage: error: Context: "int handleImportAppliance(HandlerArg*)" at line 306 of file VBoxManageAppliance.cpp
Debugging and fixing:
ls -al /Users/suzanne/.vagrant.d/boxes/precise64-customized-sk/virtualbox/box.ovf
# no such file
ls /Users/suzanne/.vagrant.d/boxes/precise64-customized-sk
# a bunch of files, including box.ovf; also a `virtualbox` folder I created from fixing the first error
# lets see what a working box looks like:
ls /Users/suzanne/.vagrant.d/boxes/precise64
# everything in `virtualbox` folder
mv /Users/suzanne/.vagrant.d/boxes/precise64-customized-sk/* /Users/suzanne/.vagrant.d/boxes/precise64-customized-sk/virtualbox
vagrant up # WORKS