2016-02-22 4 views
0

Я пытаюсь настроить бродягу с помощью CentOS7.2.vagrant centos7.2 Vagrantfile

Я нашел это на Атлас: 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$ 

ответ

1

It похоже, что ящик размещен некорректно. на странице атласе, есть предупреждение упоминая

Atlas failed to verify the existence of this external box. It may have been moved and is no longer available.

и если вы пытаетесь перейти на страницу загрузки, он пытается перенаправить вас на 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. Вы можете обратиться к поставщику этого ящика, чтобы он мог исправить ссылку
  2. Вы можете искать другой ящик
  3. Вы можете построить коробку самостоятельно, используя инструмент, как упаковщик, https://github.com/boxcutter/centos имеет шаблон для centos7.2
1

Я получаю его с бродяга INIT Boxcutter/centos72-рабочий стол

$ 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)[email protected]:~/lab/sandbox/akd-iac/vagrant_cos$ vi Vagrantfile 

И затем:

$ vagrant up 
... 
$