热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

Vagrantrefusestostartaftermakingsomechangestonetworking,Iwasgettingthefollowing;Vagra

Vagrant refuses to start after making some changes to networking, I was getting the following;

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

I tried to fix this by restarting the service (which failed), which then resulted in this;

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

$ 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

Others recommended restarting VirtualBox service, but this also failed;

其他人建议重启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

2 个解决方案

#1


8  

After much digging, it appears the restart command was failing due to VirtualBox processes holding locks.

经过大量挖掘后,由于VirtualBox进程持有锁,看起来重启命令失败。

This was fixed by doing;

这是固定的;

# 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

#2


1  

This worked for me.. make sure you have enable adapter 2 on virtualbox

这对我有用..确保你在virtualbox上启用了适配器2

enter image description here


推荐阅读
author-avatar
愛妳yi輩zi
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有