linux - Vagrant 拒绝启动(远程连接断开)

标签 linux macos ubuntu vagrant virtualbox

在对网络进行一些更改后,Vagrant 拒绝启动,我得到以下信息;

$ 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...

我试图通过重启服务来解决这个问题(失败),然后导致了这个问题;

$ 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

别人建议重启VirtualBox服务,这个也失败了;

✗ 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

最佳答案

经过大量挖掘,重启命令似乎因 VirtualBox 进程而失败 holding locks .

这是通过做修复的;

# 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

关于linux - Vagrant 拒绝启动(远程连接断开),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28148984/

相关文章:

ios - 翔升 : asl_search() can't get logs write by asl_log()

java - 开始使用最新版本的 hadoop 和 ec2

c - POSIX if.h 是否需要库才能使用

c - 为什么 main 函数总是加载在同一个地址,而变量大多数时候有不同的地址?

java - 自动为sh脚本启动的Java应用程序创建桌面图标。苹果系统

ios - NSHashTable 计数错误地报告非空

linux - Linux的选择

java - 从 Java 程序执行控制台脚本

python - “没有这样的文件或目录”还存在吗?

linux - 无法使 crontab 工作