I'm using the CoreOS vagrant repository (https://github.com/coreos/coreos-vagrant) on Fedora 24, with the distro-supplied vagrant (vagrant-1.8.1-3.fc24.noarch
). When I run vagrant up
I get the following:
$ vagrant up
Bringing machine 'core-01' up with 'virtualbox' provider...
==> core-01: Box 'coreos-alpha' could not be found. Attempting to find and install...
core-01: Box Provider: virtualbox
core-01: Box Version: >= 0
==> core-01: Box file was not detected as metadata. Adding it directly...
==> core-01: Adding box 'coreos-alpha' (v0) for provider: virtualbox
core-01: Downloading: https://storage.googleapis.com/alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json
The box failed to unpackage properly. Please verify that the box
file you're trying to add is not corrupted and try again. The
output from attempting to unpackage (if any):
bsdtar: Error opening archive: Unrecognized archive format
Looking in Vagrantfile
I can see that the box is referred to by a remote URL:
config.vm.box_url = "https://storage.googleapis.com/%s.release.core-os.net/amd64-usr/%s/coreos_production_vagrant.json" % [$update_channel, $image_version]
When I try and add the box explicitly using the remote JSON file directly I get:
$ vagrant box add https://storage.googleapis.com/alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json
==> box: Box file was not detected as metadata. Adding it directly...
A name is required when adding a box file directly. Please pass
the `--name` parameter to `vagrant box add`. See
`vagrant box add -h` for more help.
If I download the JSON file and add the box referencing the local file, it works fine, but I end up with a reference to the local file in the box's metadata_url
in ~/.vagrant
and I lose the functionality of vagrant's box update check.
I read that this might be caused by the fact that the remote JSON is not served with the correct Content-type
, however, that is certainly not the problem here:
curl -sv https://storage.googleapis.com/alpha.release.core-os.net/amd64-usr/current/coreos_production_vagrant.json 2>&1 | grep -i Content-type
< content-type:application/json