vagrant up报错 * The box 'tBox' could not be found


Mac(10.9.2)下安装Vagrant。

Vagrant version:  1.3.5

VirtualBox version: 4.3.10

Box: vagrant-centos-5.10-x86_64.box

安装完毕之后,vagrant up报错了。。。

localhost:dev angel$ vagrant up

Bringing machine 'default' up with 'virtualbox' provider...

There are errors in the configuration of this machine. Please fix

the following errors and try again:


vm:

* The box 'tBox' could not be found.


tBox找不到。。。。

用如下命令查找目前添加的所有镜像。

vagrant box list

显示如下:

localhost:dev angel$ vagrant box list

tBox        (vmware_fusion)

发现了什么, vmware_fusion,奇怪,明明我安装的时virtualbox ????

ok, 按默认方式重新增加一个镜像。

localhost:dev angel$ vagrant box add centos-5.10 ~/Downloads/vagrant-centos-5.10-x86_64.box 

Downloading or copying the box...

Extracting box...te: 209M/s, Estimated time remaining: 0:00:01)

Successfully added box 'centos-5.10' with provider 'vmware_fusion'!

看到没有,Successfully added box ‘centos-5.10' with prover 'vmware _fusion',   增加镜像,默认provider(不知道怎么称呼)是”vmware_fusion“。

ok,既然发现了问题。解决的思路也有了。

重新增加一个镜像,指定provider。如下。

localhost:dev angel$ vagrant box add --provider virtualbox centos-5.10-virtualbox ~/Downloads/vagrant-centos-5.10-x86_64.box 

Downloading or copying the box...

Extracting box...te: 199M/s, Estimated time remaining: --:--:--)

The box you attempted to add doesn't match the provider you specified.


Provider expected: virtualbox

Provider of box: vmware_fusion

MyGod, 看到没有 期望的Provider是virtualbox,而目前的使用的box是给vmware_fusion使用的。看来是下错文件。

官方box镜像网站去重新下载Provider是virtuabox的box镜像。

下载之后重新添加box.

localhost:dev angel$ vagrant box add centos-virtualbox ~/Downloads/CentOS-56-x64-packages-puppet-2.6.10-chef-0.10.6.box 

Downloading or copying the box...

Extracting box...te: 208M/s, Estimated time remaining: --:--:--)

Successfully added box 'centos-virtualbox' with provider 'virtualbox'!

vagrant up启动成功。

localhost:dev angel$ vagrant  up

Bringing machine 'default' up with 'virtualbox' provider...

[default] Importing base box 'centos-virtualbox'...

[default] Matching MAC address for NAT networking...

[default] Setting the name of the VM...

[default] Clearing any previously set forwarded ports...

[default] Creating shared folders metadata...

[default] Clearing any previously set network interfaces...

[default] Preparing network interfaces based on configuration...

[default] Forwarding ports...

[default] -- 22 => 2222 (adapter 1)

[default] Booting VM...

[default] Waiting for machine to boot. This may take a few minutes...

[default] Machine booted and ready!

[default] The guest additions on this VM do not match the installed version of

VirtualBox! In most cases this is fine, but in rare cases it can

cause things such as shared folders to not work properly. If you see

shared folder errors, please update the guest additions within the

virtual machine and reload your VM.


Guest Additions Version: 4.2.0

VirtualBox Version: 4.3

[default] Mounting shared folders...

[default] -- /vagrant

总结:虚拟机和镜像文件是有对应关系的。下载镜像文件需要注意下。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值