2015-01-26 26 views
5

Vagrant từ chối để bắt đầu sau khi thực hiện một số thay đổi cho mạng, tôi đã nhận được sau đây;Vagrant từ chối để bắt đầu (kết nối từ xa ngắt kết nối)

$ vagrant up 
default: Warning: Connection timeout. Retrying... 
default: Warning: Remote connection disconnect. Retrying... 
default: Warning: Remote connection disconnect. Retrying... 
default: Warning: Remote connection disconnect. Retrying... 
default: Warning: Remote connection disconnect. Retrying... 

Tôi đã cố khắc phục điều này bằng cách khởi động lại dịch vụ (không thành công), sau đó dẫn đến điều này;

$ vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Checking if box 'ubuntu/trusty64' is up to date... 
==> 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: NS_ERROR_FAILURE 
VBoxManage: error: Failed to create the host-only adapter 
VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: failed to open /dev/vboxnetctl: No such file or directory 
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface 
VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp 

Những người khác nên khởi động lại dịch vụ VirtualBox, nhưng điều này cũng không thành công;

✗ sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart 
Unloading VBoxDrv.kext 
(kernel) Can't remove kext org.virtualbox.kext.VBoxDrv; services failed to terminate - 0xe00002c7. 
Failed to unload org.virtualbox.kext.VBoxDrv - (iokit/common) unsupported function. 
Error: Failed to unload VBoxDrv.kext 
Fatal error: VirtualBox 

Trả lời

8

Sau nhiều lần đào, có vẻ như lệnh khởi động lại không thành công do quy trình VirtualBox holding locks.

Điều này đã được khắc phục bằng cách thực hiện;

# kill all virtualbox related processes 
$ ps aux | grep vbox -i | awk -F ' ' '{print $2}' | xargs 

# restart virtualbox service 
$ sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart 

# try again 
$ vagrant up 
+0

nop, tôi đã cố gắng giải pháp này trên mac và vẫn như nhau. –

1

này đã làm việc cho tôi .. chắc chắn rằng bạn có cho phép bộ chuyển đổi 2 trên VirtualBox

enter image description here

+1

Điều này nên là một bình luận hơn là câu trả lời. – KeyWeeUsr

Các vấn đề liên quan