Failed to create host-only adapter - windows 10, docker, virtualbox

I recently ran into this problem after I used the docker toolbar without any problems.

Getting started after updating windows?

Windows 10 Home - 64

Remote and Reinstall Docker Toolbar

Removed and reinstalled various versions of VirtualBox

Still get the same error

Running pre-create checks... Creating machine... (default) Copying C:\Users\me\.docker\machine\cache\boot2docker.iso to C:\Users\me\.docker\machine\machines\default\boot2docker.iso... (default) Creating VirtualBox VM... (default) Creating SSH key... (default) Starting the VM... (default) Check network to re-create if needed... (default) Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar. (default) Creating a new host-only adapter produced an error: C:\Program Files\Oracle\VirtualBox\VBoxManage.exe hostonlyif create failed: (default) 0%... (default) Progress state: E_FAIL (default) VBoxManage.exe: error: Failed to create the host-only adapter (default) VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002) (default) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface (default) VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 71 of file VBoxManageHostonly.cpp (default) (default) This is a known VirtualBox bug. Let try to recover anyway... Error creating machine: Error in driver during machine creation: Error setting up host only network on machine start: The host-only adapter we just created is not visible. This is a well known VirtualBox bug. You might want to uninstall it and reinstall at least version 5.0.12 that is is supposed to fix this issue Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue... 
+9
docker virtual-machine virtualbox docker-machine docker-toolbox
source share
7 answers

tl; dr If you are using Trend Micro or Symantec antivirus solutions, try uninstalling Virtualbox and then reinstalling it with the antivirus disabled. This may work with others.

I am adding this answer for the record.

My colleagues and I had a similar problem right after upgrading from Windows 10 Pro version 1703 to version 1709.

I tried rolling back to version 1703, and it worked, but of course, this is not an acceptable solution.

For some reason, this was due to an antivirus, in our case, Trend Micro Office Scan. After a clean reinstall with the antivirus disabled, the adapter for the host only became available again.

The issue was reported on the Virtualbox forum and tracker:
https://forums.virtualbox.org/viewtopic.php?f=6&t=86179#p413876
https://www.virtualbox.org/ticket/17354#comment:22

Unfortunately, this error occurs quite often, and this has been reported dozens of times for various reasons. In our case, the settings shown in the bszom answer were already correct.

+4
source share

This answer is not specifically related to Docker, but, seeing that this is one of the last search results on the top stack (see this one ) on Google, when the search “Failed to create a host-only error message from VirtualBox, I leave it here, hoping this helps someone else.

As an additional note, if possible, I recommend that you use Docker for Windows instead of the Docker Toolbox to run Docker on Windows (requires Windows 10 Professional or Enterprise 64-bit).


My scenario:

  • Windows 10 Pro Version 1709
  • I use Hyper-V to start virtual machines whenever possible, but to do this I had to run an old virtual virtual machine with Windows XP as a guest OS
  • VirtualBox 5.2.4-119785 (Windows only supports one hypervisor - I can recommend this approach if you need to switch between Hyper-V and VirtualBox)
  • VirtualBox could not (or could not) create an adapter only for the host during installation

When I tried to create an adapter only for the host using the Host Network Manager GUI, I received the error message "Failed to create the adapter only for the host" with the detail: "NetCfgInstanceId request error (0x00000002))" .

Since I use Hyper-V, I had several Hyper-V Virtual Ethernet virtual adapters in addition to the actual physical adapter.

Network connections

Looking at the properties of the physical adapter, it seems normal for Hyper-V to disable all protocol drivers except for the "Hyper-V Extensible Virtual Switch". Then Windows gets its network connection through one of the virtual adapters, in my case it is called "External Virtual Switch", and there the usual set of protocol drivers (TCP / IPv4, etc.) is included.

Hyper-V Extensible Virtual Switch

Then I noticed that VirtualBox appears (wants) to work in a similar way because it managed to install and enable a new protocol driver called "VirtualBox NDIS6 Bridged Networking Driver".

VirtualBox NDIS6 Bridged Networking Driver

When I checked the properties of other virtual adapters, I noticed that the "VirtualBox NDIS6 Bridged Networking Driver" was enabled for all of them, but the "Hyper-V Extensible Virtual Switch" was not. It was strange that the VirtualBox driver was enabled on Hyper-V virtual adapters , so I disabled it at all, but left it enabled on the physical adapter.

I think that at this point I threw a good old reboot for good luck, although I doubt whether it was really necessary. When I subsequently tried again to create a VirtualBox adapter for the host, it would work! (Actually, I received an error message from VirtualBox, in modal form, which I needed to find on the taskbar about the adapter name already used. However, the new “Ethernet adapter for hosting VirtualBox” appeared under Windows Network Connections and when I closed and opened the Virtual Network window of the VirtualBox Network Manager again, and the adapter appeared there.)

TL; DR;

My theory is that VirtualBox for some reason cannot determine which adapter is the actual network adapter, and in a rather gung-ho manner goes ahead and allows its "VirtualBox NDIS6 Bridged Networking Driver" for everyone that it finds .

In addition, he seems unable to determine which adapter he needs to create his own virtual “adapter-shell” for and fails.

Even if you do not use / do not have Hyper-V, you can have several adapters, including virtual ones (for example, a large number of VPN programs install virtual adapters).

You can try disabling the "VirtualBox NDIS6 Bridged Networking Driver" on all but the actual physical network adapters before attempting to re-create the VirtualBox virtual host adapter.


This, of course, is not a new problem for VirtualBox, judging by the large number of related tickets on their public bugtracker and in other places that are more than two years old. I have a feeling that for many people the problem may be related to what I described above, so I hope this helps them.


Edit 01/15

Hmm, in retrospect I’m not sure how Windows usually uses the Hyper-V virtual virtual switch to connect to the network. If I remember correctly, the "Default" switch that Hyper-V creates and which provides connection to guests through NAT is a relatively new thing, and before I had to add and use an "external" switch ... On my home PC, External switch, regular TCP / IPv4 protocol drivers, etc. remain enabled on the physical network adapter, and Hyper-V Extensible Virtual Switch is disabled on both the physical and virtual adapters. I was not able to verify what would happen if I add a new “External Virtual Switch” in these circumstances.

+3
source share

I was able to get this to work by disabling all network adapters except the physical one during installation. After installation is complete, you can turn them on again. To disable adapters, follow these steps:

  1. Open control panel
  2. Network connections
  3. Select each adapter, and then select "Disable this network device" at the top
+1
source share

Windows just upgraded me to build 1709, and my host adapters disappeared, and I can’t create a new one because of this error: NetCfgInstanceId request error (0x00000002).

It seems that rolling back updates is the only option at the moment.

0
source share

Unfortunately, I also had a problem (Win10, 1709, virtualbox 5.1). When using vagrant to extract Linux images from the Internet.

It fixed

Get your network drivers at the latest booth

Remove Virtualbox

Reinstall Virtualbox

Check if there is a host-only virtual adapter in the network adapter configuration. If so, then you go. If not. Try installing it from vboxmanage.

 C:\Program Files\Oracle\VirtualBox\VBoxManage.exe hostonlyif create 

And remove the HyperV Virtual Ethernet Adapter from the device manager if you see it (this usually blocks the creation of a VirtualBox virtual network ( Host-Only Ethernet adapter))

I had this problem on one type of computer of my company, but not on other types. So this should be related to the type of network adapter itself. so sometimes you are lucky and sometimes not. But I was more fortunate that I had the equipment to the last stand.

0
source share

I got the same error.

When checking Windows Device Manager, a Virtualbox network adapter device with an exclamation mark was found.

The device status indicated that for some reason there was a problem with the signature.

I do not urge anyone to ignore the warning, but I decided to do it :)

I turned off Windows signature verification using the method described in this link , and finally was able to use Virtualbox with a host-only adapter.

Note: this answer was a duplicate. I deleted others

0
source share

I got the same error.

But I do not have the " Bridged NDIS6 VirtualBox Network Bridge Driver " in the properties of the physical connection. There is the same " NPCAP ... " driver from the wireshark installation. If you look at the description, you will see that it is an NDIS6 driver.

Then I remove all wireshark packages: NPCAP, WinPCAP, Wireshark and delete VirtualBox.

Reboot

Reinstall Virtual Box. Install the Docker ToolBox ( Uncheck the Install NDIS5 box ). And create a default virtual machine for docker.

 docker-machine create -d "virtualbox" default 

The host interface is created normally.

 docker-machine status Running 

This works for me.

0
source share

All Articles