【问题标题】:Vagrant refusing to start (Remote connection disconnect)Vagrant 拒绝启动(远程连接断开)
【发布时间】:2015-03-24 19:10:26
【问题描述】:

对网络进行一些更改后,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

【问题讨论】:

    标签: linux macos ubuntu vagrant virtualbox


    【解决方案1】:

    经过大量挖掘,似乎由于 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
    

    【讨论】:

    • 不,我在mac上试过这个解决方案,还是一样。
    【解决方案2】:

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

    【讨论】:

    • 这应该是评论而不是答案。
    猜你喜欢
    • 2014-09-22
    • 1970-01-01
    • 2023-03-20
    • 2018-02-18
    • 2020-11-12
    • 1970-01-01
    • 2020-09-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多