vagrant在windows下的安裝和配置

來源:互聯網
上載者:User

標籤:ror   .com   val   硬體   最新   目錄   conf   AC   appear   

記錄一下安裝和配置過程中的一些坑
步驟一
分別下載vagrant和VirtualBox,我這裡下載的是vagrant_1.9.1.msi 和 VirtualBox-5.1.14-112924-Win.exe

步驟二
這兩個東東安裝好之後,我在e盤建立了一個myvagrant目錄,作為工程目錄,進入該目錄,進行添加box

其中centos7.0是自訂的box的名字,後面是本地box的路徑

添加完後 vagrant init cento7.0然後就會在myvagrant目錄下產生一個vagrantfile檔案

然後開啟這個檔案,修改一下這裡

=================================================

配置好後,輸入vagrant up

這樣就啟動成功了。

 

坑一:
就是在vagrant up的時候出現如下錯誤
If the provider you‘re using has a GUI that comes with it,
it is often helpful to open that and watch the machine, since the
GUI often has more helpful error messages than Vagrant can retrieve.
For example, if you‘re using VirtualBox, run `vagrant up` while the
VirtualBox GUI is open.

The primary issue for this error is that the provider you‘re using
is not properly configured. This is very rarely a Vagrant issue.

然後在stackoverflow看了答案,跟著改了還是無果,最後我卸載掉原來安裝好的virtualbox,然後去官網下載最新的virtualbox,版本是VirtualBox-5.1.14-112924-Win.exe
然後在vagrant up的時候這個錯誤就消失了,virtualbox版本的原因

坑二:

If you‘re using a custom box, make sure that networking is properlyworking and you‘re able to connect to the machine. It is a commonproblem that networking isn‘t setup properly in these boxes.Verify that authentication configurations are also setup properly,as well.If the box appears to be booting properly, you may want to increasethe timeout ("config.vm.boot_timeout") value.

因為配置的時候開啟了調用virtualbox可視化介面,所以出現這個提示的時候,virtualbox那也會彈出一個警告
VT-x/AMD-V硬體加速在您的系統中不可用。您的64-位虛擬機器將無法檢測到 64-位處理器,從而無法啟動。

在網上找到解決辦法是重啟按f2進入bios設定,然後開啟虛擬化支援,然後儲存,重新啟動,這個時候再用vagrant up就成功了。

vagrant在windows下的安裝和配置

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.