【问题标题】:vagrant centos7.2 Vagrantfilevagrant centos7.2 Vagrantfile
【发布时间】:2023-04-05 20:50:02
【问题描述】:

我尝试用 CentOS7.2 设置一个 vagrant。

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

【问题讨论】:

    标签: vagrant centos7 vagrantfile


    【解决方案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. 您可能需要联系此框的提供商,以便他修复链接
    2. 您可以搜索另一个框
    3. 你可以使用packer之类的工具自己构建盒子,https://github.com/boxcutter/centos有centos7.2的模板

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 2018-10-27
        • 1970-01-01
        • 2015-09-13
        • 2017-05-11
        • 1970-01-01
        • 2014-04-11
        • 2014-05-25
        • 2013-10-29
        • 1970-01-01
        相关资源
        最近更新 更多