我尝试用CentOS7.2设置一个流浪汉。
我在Atlas上发现了这个:https://atlas.hashicorp.com/brightcove/boxes/centos7.2 但是当我用
设置我的VagrantFile时config.vm.box = "brightcove/centos7.2"
和
config.vm.box_url = "https://atlas.hashicorp.com/brightcove/boxes/centos7.2"
我收到此错误:
vagrant_centos$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'brightcove/centos7.2' could not be found. Attempting to find and install...
default: Box Provider: virtualbox
default: Box Version: >= 0
==> default: Loading metadata for box 'https://atlas.hashicorp.com/brightcove/boxes/centos7.2'
default: URL: https://atlas.hashicorp.com/brightcove/boxes/centos7.2
==> default: Adding box 'brightcove/centos7.2' (v1.0.14) for provider: virtualbox
default: Downloading: https://atlas.hashicorp.com/brightcove/boxes/centos7.2/versions/1.0.14/providers/virtualbox.box
An error occurred while downloading the remote file. The error
message, if any, is reproduced below. Please fix this error and try
again.
Couldn't resolve host 'xivagrantbox.vidmark.local'
vagrant_centos$
答案 0 :(得分:1)
似乎盒子没有正确托管在任何地方。在地图册页面上,有一个警告提到
Atlas未能验证此外部盒子是否存在。它可能有 被移动,不再可用。
如果您尝试转到下载页面,它会尝试将您重定向到显然不存在的xivagrantbox.vidmark.local网站
$ curl https://atlas.hashicorp.com/brightcove/boxes/centos7.2/versions/1.0.14/providers/virtualbox.box
<html><body>You are being <a href="http://xivagrantbox.vidmark.local/vagrant-boxes/bc-ops-base-centos-7.2.1511.box">redirected</a>.</body></html>
如何从那里搬家:
答案 1 :(得分:1)
我用 vagrant init boxcutter / centos72-desktop
获得它$ vagrant init boxcutter/centos72-desktop
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
(lab)luis@spinoza:~/lab/sandbox/akd-iac/vagrant_cos$ vi Vagrantfile
然后:
$ vagrant up
...
$