VBoxManage: 错误:无法创建主机-only适配器(II)

6

此错误先前已在帖子中报告:VBoxManage:错误:无法创建主机专用适配器,并且根据以下描述,它会不断重新发生。如果有人针对以下设置已经找到了解决此问题的方法,请在此分享:

  • 主机:Windows 10 Home 版本1607; OS build 14939.105
  • 客户端:使用"bento/ubuntu-14.04"镜像
  • Vagrant:1.8.5
  • Oracle VB:5.1.4 r110228(Qt5.5.1)

我安装了Oracle VB和Vagrant(两个都是全新安装),然后像一个工作区一样运行了vagrant up。在vagrant完成下载虚拟盒子后,当尝试启动VM时,它会给出以下错误输出:

C:\Users\AHL\workspace>vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Box 'bento/ubuntu-14.04' could not be found. Attempting to find and install...
    default: Box Provider: virtualbox
    default: Box Version: >= 0
==> default: Loading metadata for box 'bento/ubuntu-14.04'
    default: URL: https://atlas.hashicorp.com/bento/ubuntu-14.04
==> default: Adding box 'bento/ubuntu-14.04' (v2.2.9) for provider: virtualbox
    default: Downloading: https://atlas.hashicorp.com/bento/boxes/ubuntu-14.04/versions/2.2.9/providers/virtualbox.box
    default: Progress: 100% (Rate: 74436/s, Estimated time remaining: --:--:--)
==> default: Successfully added box 'bento/ubuntu-14.04' (v2.2.9) for 'virtualbox'!
==> default: Importing base box 'bento/ubuntu-14.04'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'bento/ubuntu-14.04' is up to date...
==> default: Setting the name of the VM: workspace_default_1473571560144_68182
==> 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_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Operation canceled by the user
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component VirtualBoxWrap, interface IVirtualBox
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 71 of file VBoxManageHostonly.cpp

C:\Users\AHL\workspace>

Vagrantfile:

Vagrant.configure(2) do |config|
  config.vm.box = "bento/ubuntu-14.04"
  config.vm.network "private_network", ip: "192.168.33.10"
end
5个回答

2
解决这个问题的方法似乎与相关帖子中报道的相同:
尽管 Oracle VB GUI 中的 VM 显示为未运行,但您必须通过 Oracle VB GUI 手动启动它(这应该可以让您登录到该框),然后再次通过 Oracle VB GUI 手动关闭它。然后,再次运行 vagrant up,它应该可以正常工作。
如果您在此设置中遇到问题,请在本帖中添加评论。

2

在Windows 10上

  • 导航到Program Files > Oracle > VirtualBox > drivers > network > netadp6
  • 右键单击 "VBoxNetAdp6.inf" 并选择 "安装"。

在执行这些步骤之前,您可能需要关闭VirtualBox,然后重新运行vagrant up,或者甚至vagrant destroy


1
尝试以管理员身份执行 C:\HashiCorp\Vagrant\bin\vagrant.exe,然后在命令行中执行 vagrant up。对我有用。

0

只需启动虚拟机即可。就这样。


-1

更新2020.10:以下步骤不再适用。

如果您安装了没有网络支持的VirtualBox,或者没有安装网络支持。

请尝试以下步骤:

  1. 打开VirtualBox
  2. 菜单 文件 ---> 设置 ---> 网络
  3. 在右侧,点击“添加新网络”按钮 Image
  4. 假定默认设置
  5. 在终端输入命令:vagrant up

对我来说,这个方法奏效了。祝好运!


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接