Vagrant 无法创建仅用于主机的适配器
我的系统出现了Wagrant up问题。我有错误,你可以看到下面。我试过重新安装VBox、Vagrant、关闭防火墙、检查VBox网络驱动程序并重新启动主机系统,但都不起作用 谢谢大家的帮助Vagrant 无法创建仅用于主机的适配器,vagrant,virtual-machine,virtualbox,vagrant-windows,Vagrant,Virtual Machine,Virtualbox,Vagrant Windows,我的系统出现了Wagrant up问题。我有错误,你可以看到下面。我试过重新安装VBox、Vagrant、关闭防火墙、检查VBox网络驱动程序并重新启动主机系统,但都不起作用 谢谢大家的帮助 There was an error while executing `VBoxManage`, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["host
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: SetupDiCallClassInstaller (DIF_INSTALLDEVICE) failed
(0x00000002)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component
HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdeclhandleCreate(struct
HandlerArg *)" at line 94 of file VBoxManageHostonly.cpp
VBox版本
5.2.22
流浪版本
2.2.0
主机操作系统
Win7 x64
来宾操作系统
Ubuntu-16.04.5-desktop-amd64
流浪汉档案
dir = File.dirname(File.expand_path(__FILE__))
require 'yaml'
require "#{dir}/puphpet/ruby/deep_merge.rb"
require "#{dir}/puphpet/ruby/to_bool.rb"
configValues = YAML.load_file("#{dir}/puphpet/config.yaml")
provider = ENV['VAGRANT_DEFAULT_PROVIDER'] ? ENV['VAGRANT_DEFAULT_PROVIDER'] : 'local'
if File.file?("#{dir}/puphpet/config-#{provider}.yaml")
custom = YAML.load_file("#{dir}/puphpet/config-#{provider}.yaml")
configValues.deep_merge!(custom)
end
if File.file?("#{dir}/puphpet/config-custom.yaml")
custom = YAML.load_file("#{dir}/puphpet/config-custom.yaml")
configValues.deep_merge!(custom)
end
data = configValues['vagrantfile']
Vagrant.require_version '>= 1.8.1'
Vagrant.configure('2') do |config|
eval File.read("#{dir}/puphpet/vagrant/Vagrantfile-#{data['target']}")
end
检查此链接:
如果这不起作用,那么关于这一点的评论20和这一点建议
执行以下操作:
I was able to work around this problem for me with the following steps:
Open the VirtualBox Manager GUI.
Go to File -> Preferences -> Network -> Host-only Networks
Delete all entries in that list
Run vagrant up again
我在我的主机上流浪了 经过多次尝试后,我重新安装了Windows。需要虚拟机主机驱动程序(Windows网络中仅限虚拟机主机的以太网适配器)只安装在“干净”系统上,这对我来说非常奇怪 Vagrant还需要旧于3的Windows PowerShell版本,但Win7默认使用2。您需要更新Windows Net Framework,以便在Win7上安装3及更高版本
祝你好运 最近两天我因为这个问题发疯了。终于找到了解决办法 1.该问题是由防病毒软件引起的 2.您需要禁用windows系统上的防病毒服务(您将需要管理员访问权限或从公司IT人员处完成此操作) 3.重新安装Docker工具箱并启动它(管理模式)
这是有效的我发现所有其他解决方案都不起作用, 直到我找到这个帖子: 在YAML文件中,在end标记之前添加下一个代码就达到了目的
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
end
谢谢你的回答,但这对我毫无帮助。但似乎我明白在什么问题上。我在网络连接窗口中没有VirtualBox主机专用适配器。VirtualBox NDIS6桥接网络驱动程序仅在“基于NDIS的远程Internet共享设备”的属性中具有,并且我无法在“仅主机网络”(VirtualBox GUI)中创建此主机适配器错误SetupDiCallClassInstaller(DIF_INSTALLDEVICE)失败(0x00000002)。