【问题标题】:how to add a local box file into vagrant box如何将本地 box 文件添加到 vagrant box
【发布时间】:2019-07-10 01:02:12
【问题描述】:

我正在学习vagrant(https://www.vagrantup.com/intro/getting-started/boxes.html),因为不能直接“vagrant box add hashcorp/precise64”页面上写的,我先下载hashicorp/precise64,然后添加。它说“盒子:成功为 virtualbox 添加了盒子‘hashicorp/premature64’(v0)”。然后我按照页面上写的那样配置了 vagrantfile。但是当我“vagrant up”时,它说“找不到盒子'hashicorp/premature64'。......进程0%......”。我一直在寻找解决方案,但找不到。有人可以帮忙吗?谢谢!

【问题讨论】:

  • 澄清你是否运行vagrant box add hashicorp/precise64

标签: vagrant


【解决方案1】:

很高兴看到您试用 Vagrant,因为它是一个非常有用的工具。关于 hashcorp/precise64 的一些背景,这个盒子很受欢迎,是的,但它是 Ubuntu 12.04 的过时版本。我建议使用 Ubuntu 16.04 的 ubuntu/xenial64。要使用它,您将首先运行:

vagrant init ubuntu/xenial64

然后

vagrant up

此过程可能需要一些时间,因为它是第一次初始化盒子。一旦它启动并运行,请随意 ssh 进入它:

vagrant ssh

我还建议您查看他们的快速入门指南here

【讨论】:

  • 谢谢。我确实运行了“vagrant box add hashcorp/precise64,但总是失败。所以我先下载了box文件,然后添加了它。它说“添加成功”,但是当我运行“vagrant up”时,它说“盒子找不到“。
猜你喜欢
  • 2014-03-30
  • 2015-06-18
  • 1970-01-01
  • 2016-09-27
  • 2014-10-13
  • 2018-08-10
  • 2023-03-21
  • 2012-04-26
  • 1970-01-01
相关资源
最近更新 更多