user3313834
user3313834

Reputation: 7837

vagrant centos7.2 Vagrantfile

I try to setup a vagrant with a CentOS7.2.

I've found this on Atlas: https://atlas.hashicorp.com/brightcove/boxes/centos7.2 But when I set on my VagrantFile with

config.vm.box = "brightcove/centos7.2"

and

config.vm.box_url = "https://atlas.hashicorp.com/brightcove/boxes/centos7.2"

I get this error:

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$  

Upvotes: 0

Views: 1203

Answers (2)

user3313834
user3313834

Reputation: 7837

I get it with 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

And then:

$ vagrant up
...
$

Upvotes: 1

Frederic Henri
Frederic Henri

Reputation: 53733

It seems like the box is not correctly hosted anywhere. on the atlas page, there's a warning mentioning

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

and if you try to go to the download page, it tries to redirect you to the xivagrantbox.vidmark.local site which obviously does not exist

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

how to move from there:

  1. You might want to contact the provider of this box so he can fix the link
  2. You can search for another box
  3. You can build the box yourself using tool like packer, https://github.com/boxcutter/centos has template for centos7.2

Upvotes: 1

Related Questions