Machine: Docker machine failing on Windows

Created on 1 Feb 2016  路  15Comments  路  Source: docker/machine

docker-machine fails to load with virtual-box as provider in Windows 7. Entire log on quick start terminal :

Starting "default"...
(default) Creating a new host-only adapter produced an error: C:\Program Files\O
racle\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: SetupDiCreateDeviceInfo failed (0x00000005)
(default) VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component Ho
stNetworkInterfaceWrap, 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's try to recover anyway...
Error setting up host only network on machine start: Failed to find a new host-o
nly adapter
Looks like something went wrong... Press any key to continue..
arewindows drivevirtualbox

Most helpful comment

Thank you very very much for sharing this:

I did the steps you described, basically uninstalling everything:

After that:

  • I uninstalled zone alarm as well (just to reinstall it after the Host Only Adapter is present). Previously I only deactivated it but that didn't seem enough if that was the reason.
  • Then restart the system
  • In addition to this I started the VBox installation with the command VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS6 <- so declaring specifically NDIS6 here.

After this the VBox Installation was much faster than before (a good sign I thought) and when I looked up if the "Host Only Adapter" is present it was.

Hope this rough description of the steps that I did can help someone with the same problem. Took me ~8h ...

All 15 comments

Hi @dejames, thanks for filling a bug report. Can you tell us which version of docker machine you are using?

Hi @dgageot
These are the versions :

  • docker version 1.9.1, build a34a1d5
  • docker-machine version 0.5.6, build 61388e9
  • docker-compose version 1.5.2, build e5cf49d

Thanks @dejames Can you try with version 0.6.0?

Hi,

Same issue for me, Windows 7.

  • docker version 1.10.0, build 590d5108
  • docker-machine Version: 0.6.0, build e27fb87
  • docker-compose version 1.6.0, build cdb920a

our friends over at Oracle:

C:\Program Files\Oracle\VirtualBox>VBoxManage hostonlyif create
0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 71 of file VBoxManageHostonly.cpp

Client:
Version: 1.10.1
API version: 1.22
Go version: go1.5.3
Git commit: 9e83765
Built: Thu Feb 11 19:14:21 2016
OS/Arch: windows/amd64

At the moment VB 5.0.15-105511 but have tried other 5.0.15s and 5.0.14 too with same results.

Windows 10.

Now also add VirtualBox 5.0.15-105570 (test build) to the list, not able to add host only adapter.

Microsoft Windows [Version 10.0.10586]

Since there is a new test build of VirtualBox available for Windows, lets also add that one to the list as not able to add host only adapter:

  • VirtualBox 5.0.15-105609

C:\Program Files\Oracle\VirtualBox>VBoxManage.exe hostonlyif create
0%...
Progress state: E_FAIL
VBoxManage.exe: error: Failed to create the host-only adapter
VBoxManage.exe: error: Querying NetCfgInstanceId failed (0x00000002)
VBoxManage.exe: error: Details: code E_FAIL (0x80004005), component HostNetworkInterfaceWrap, interface IHostNetworkInterface
VBoxManage.exe: error: Context: "enum RTEXITCODE __cdecl handleCreate(struct HandlerArg *)" at line 71 of file VBoxManageHostonly.cpp

So after giving up on whatever suits Oracle in their random priorities of making people suffer I did get deep into this.

After a lot of experimenting and reading up on what happens where, especially with regards to installing drivers, I was able to manage to get the network driver "Host Only Adapter" installed as a device, but NOT appearing in Network Connections.

To get it installed as a device, uninstalling VirtualBox (and/or Docker for that matter) may not be enough. Some registry handling for good measure, may have to be exercised. And then if the device is installed some further clean up may be necessary.

The following may or may not apply. Do reboot more than recommended for good measure to make sure everything is loaded and unloaded at correct times. Especially relevant when deleting files:

  1. Uninstall everything (docker, virtualbox and what not)
  2. Uninstall everything I said! That includes about anything related to networking especially (not physical drivers of course but still...). And yes remove everything related to VPNs if possible. Otherwise just drop doing anything at all, if not willing to do this.
  3. Make sure registry is "clean". And delete driver-files if available (especially vbox* in c:\windows\system32\drivers).
  4. Run netcfg in different incarnations and with different magic incantonations to list stuff. Both services and adapters. Then remove randomly with the obvious exceptions (actually needed physical adapters etc. and default Microsoft services etc)

Then and only then, and if lucky you might get something to happen.

In my case the especially offending stuff was some Zone Alarm Firewall service, and when that was removed with netcfg -u + other magical incatonations, the stuff appeared to work.

The reason for not writing any clear and specific instructions on the issues is that things may or may not apply to others either fully or partially (and of course I did this in a ranting mindset and as such did not take special care or note of anything), but I will post whatever links with especially relevant info I found on my journey:
http://answers.microsoft.com/en-us/windows/forum/windows_10-networking/after-upgrading-from-windows-81-to-windows-10-no/42b1852e-4faa-47a2-85ca-dc8e190c7c27?auth=1
http://www.askvg.com/fix-network-connections-folder-is-empty-in-windows-not-showing-network-adapters-list/
https://www.virtualbox.org/ticket/14040 (do absolutely not follow every advice in this link, but read it, read other links in this case and make a qualified guess of what possibly is needed on your side. Some of the links are for handling registrey etc.)
https://www.virtualbox.org/ticket/14437 (same as 14040 with regards to content of link)
http://www.redmondpie.com/fix-no-wi-fi-available-after-windows-10-upgrade-issue-heres-how/ (on this last one this is somewhat specific for some adapter, but the usage of netcfg is "correct")...

If anyone tries this out, and it kind of works, please do not do my mistake and please do write down every small step and post it here. I guess a "hey this fixed my problem too!" is less worth than whatever ramblings I have put here...

Thank you very very much for sharing this:

I did the steps you described, basically uninstalling everything:

After that:

  • I uninstalled zone alarm as well (just to reinstall it after the Host Only Adapter is present). Previously I only deactivated it but that didn't seem enough if that was the reason.
  • Then restart the system
  • In addition to this I started the VBox installation with the command VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS6 <- so declaring specifically NDIS6 here.

After this the VBox Installation was much faster than before (a good sign I thought) and when I looked up if the "Host Only Adapter" is present it was.

Hope this rough description of the steps that I did can help someone with the same problem. Took me ~8h ...

Had the same issue; uninstalling ZoneAlarm; rebooting; running Docker installer fixed the issue, install ran fine and created the host-only adapter and everything else it needed.

I know that this question can be OT, but it looks like there isn't any other way to solve this problem so I'm goingo to ask here:
How do you delete (and possibly, reinstall) Zone Alarm?

I had the same issue. The host only adapter was not getting created by the VBoxManage.exe. I solved it by doing the following things.

  • Uninstalled Docker and VirtualBox along with the drivers and then cleaned the registry too as suggested by @zbilbo . Installed docker and VirtualBox.

  • Started Docker Quick Start Terminal as an ADMIN. (This is were it made the difference for me)

Another way through this could be by deleting all the virtual machines in the VirtualBox and then starting the Docker Quick Start Terminal as an admin. It will then create a new Virtual Env for itself again and could possibly solve the problem. If that doesn't work then I am afraid a complete reinstallation should solve the issue.

This worked for Docker Toolbox. What I did was uninstall Docker and Oracle VM VirtualBox. I also went into the c:\windows\system32\drivers and deleted everything that started with vbox. (One of them would not delete. My computer kept saying it was running in another program, so I changed the name, which seemed to work for this scenario.) I then rebooted my computer and re-installed Docker Toolbox. Now everything works fine.

fucking shit! win7 os

Starting "default"...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to create a network adapter. Some times, 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: SetupDiCallClassInstaller (DIF_INSTALLDEVICE) failed (0xE0000003)
(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 94 of file VBoxManageHostonly.cpp
(default)
(default) This is a known VirtualBox bug. Let's try to recover anyway...
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 t
o 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 status on default麓... Press any key to continue...

Thank you very very much for sharing this:

I did the steps you described, basically uninstalling everything:

After that:

  • I uninstalled zone alarm as well (just to reinstall it after the Host Only Adapter is present). Previously I only deactivated it but that didn't seem enough if that was the reason.
  • Then restart the system
  • In addition to this I started the VBox installation with the command VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS6 <- so declaring specifically NDIS6 here.

After this the VBox Installation was much faster than before (a good sign I thought) and when I looked up if the "Host Only Adapter" is present it was.

Hope this rough description of the steps that I did can help someone with the same problem. Took me ~8h ...

Worked perfectly. Firewall application is the root casue.
1) Uninstalled virtual box completely (As given by @zbilbo)
2) Installed latest virtual box with following command VirtualBox-x.x.x-yyyyy-Win.exe -msiparams NETWORKTYPE=NDIS6
3) Installed docker toolbox with Admin rights.
4) Run Docker Terminal with Admin rights.

Hope this help anyone in future.

Was this page helpful?
0 / 5 - 0 ratings