vagrant報錯

錯誤1

vagrant up啓動時如果設置成private_network報如下錯:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[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...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "create"]

Stderr: 0%...
Progress state: E_INVALIDARG
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Assertion failed: [!aGuid.isValid()] at 'D:\tinderbox\win-4.3\src\VBox\Main\src-server\HostNetworkInterfaceImpl.cpp' (74) in long __cdecl HostNetworkInterface::init(class com::Bstr,class com::Bstr, class com::Guid,enum __MIDL___MIDL_itf_VirtualBox_0000_0000_0034).
VBoxManage.exe: error: Please contact the product vendor!
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "int __cdecl handleCreate(struct HandlerArg *,int,int *)" at line 66 of file VBoxManageHostonly.cpp

Failed to create the host-only adapte
原因是virtualbox4.3.26版本有bug,無法創建host-only網卡
解決辦法:下載4.3.24版本安裝(安裝會覆蓋掉之前的版本,但不影響之前配置的虛擬機)

–》
Failed to create the host-only adapte

錯誤2

vagrant up啓動失敗,提示:
Vagrant is attempting to interface with the UI in a way that requires a TTY
錯誤信息:

 [D:\vag]$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
==> default: Available bridged network interfaces:
1) Intel(R) Centrino(R) Wireless-N 2230
2) Realtek PCIe GBE 緋誨.?у.?
3) VirtualBox Host-Only Ethernet Adapter
==> default: When choosing an interface, it is usually the one that is
==> default: being used to connect to the internet.
Vagrant is attempting to interface with the UI in a way that requires
a TTY. Most actions in Vagrant that require a TTY have configuration
switches to disable this requirement. Please do that or run Vagrant
with TTY

這是因爲多網卡Vagrant無法選擇使用哪一個,解決辦法:
禁用掉另外其他網卡
修改vagrantfile文件,添加橋接網卡
(建議用不含中文的網卡,我用本地網卡“Realtek PCIe GBE 系列控制器”失敗,換成無線“Intel(R) Centrino(R) Wireless-N 2230”親測成功):
vm.network “public_network”, bridge: “Intel(R) PRO/1000 PL Network Connection”#(引號中的網卡換成你電腦上的網卡)
運行VAGRANT_HOME\bin\vagrant.exe,會提示一個信息讓你升級

“Press any key to continue”…

等更新完之後就可以正常啓動vagrant up了(據說在OSX中也適用)

==》

Vagrant is attempting to interface with the UI in a way that requires a TTY

錯誤3

Vagrant error : Failed to mount folders in Linux guest
解決方法:

vagrant plugin install vagrant-vbguest

參考這裏:
Vagrant error : Failed to mount folders in Linux guest

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章