標籤: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下的安裝和配置