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.

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.

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".

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.