vagrant up報錯 * The box 'tBox' could not be found

來源:互聯網
上載者:User

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

總結:虛擬機器和鏡像檔案是有對應關係的。下載鏡像檔案需要注意下。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.