无法在Fedora / Virtualbox

时间:2016-10-08 12:00:18

标签: vagrant coreos

我在Fedora 24上使用CoreOS vagrant存储库(https://github.com/coreos/coreos-vagrant)和发行版提供的vagrant(vagrant-1.8.1-3.fc24.noarch)。当我运行vagrant up时,我得到以下内容:

$ 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

查看Vagrantfile我可以看到该框由远程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]

当我尝试直接使用远程JSON文件显式添加框时,我得到:

$ 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.

如果我下载JSON文件并添加引用本地文件的框,它可以正常工作,但我最终在metadata_url~/.vagrant中引用了本地文件我失去了流浪汉盒子更新检查的功能。

我读到这可能是由于远程JSON没有使用正确的Content-type提供的,但是,这肯定不是问题所在:

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

0 个答案:

没有答案