Failed to create the host-only adapter

0

I have the problem with vagrant up on my system. I have the error, you can see below. I have tried reinstall VBox, Vagrant, turned of the firewall, сhecked VBox networking driver and restarted host system, but it`s dont working.

Thanks all for help.

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 version 5.2.22

Vagrant version 2.2.0

Host operating system Win7 x64

Guest operating system Ubuntu-16.04.5-desktop-amd64

Vagrantfile

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
vagrant
virtual-machine
virtualbox
vagrant-windows
asked on Stack Overflow Nov 12, 2018 by AndrewLunew

4 Answers

0

Check this link:

Failed to open/create the internal network Vagrant on Windows10

If that doesn't work then the comment 20 on this And this suggests on https://www.virtualbox.org/ticket/14545#comment:20

Doing the following:

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
answered on Stack Overflow Nov 12, 2018 by malyy
0

I did vagrant up on my host!

After many tries I was reinstall my Windows. The need Virtual Machine host driver (VirtualBox Host-Only Ethernet Adapter in Windows Networking) was installing only on "clean" system that very curiously for me.

Vagrant also need Windows PowerShell version older then 3, but Win7 default using 2. You need update Windows Net Framework for install 3 and older version on Win7.

Good luck!

answered on Stack Overflow Nov 14, 2018 by AndrewLunew
0

I was driving nuts last 2 days with this problem. Finally found a solution.

1.The Antivirus was causing the issue

2.You need to disable to Antivirus services on your windows system (You will need Admin access or get this done from your company IT Person)

3.Reinstall Docker tool box and start it (Admin mode) This works

answered on Stack Overflow Jan 14, 2019 by Dhanush77 • edited Jan 14, 2019 by Vineeth Sai
0

I found all other solutions did not work, till I found this post: Laravel Vagrant Up SSH Problems

where adding the next code just before the end tag in YAML file did the trick

 config.vm.provider "virtualbox" do |vb|
        vb.customize ["modifyvm", :id, "--cableconnected1", "on"]
    end
answered on Stack Overflow Oct 7, 2019 by Gerrlt

User contributions licensed under CC BY-SA 3.0