Failed to create Switch "DockerNAT": Failed while adding virtual Ethernet switch connections

Using Windows 10 with Hyper-V installed. Docker 1.12.0-rc2-beta16 (build: 4760).

After install, I see the message “Failed to create Switch “DockerNAT”: Failed while adding virtual Ethernet switch connections”.

I dropped to powershell to try to diagnose further:

PS C:\Program Files\Docker\Docker\resources> .\MobyLinux.ps1 -IsoFile:.\mobylinux.iso -Create
Enabled workaround for Build 10586 VMSwitch issue
Creating Switch: DockerNAT…
Failed to create Switch “DockerNAT”: Failed while adding virtual Ethernet switch connections.
Internal miniport create failed, name = ‘E096274C-6F4F-47C1-9660-8BE200DD31B9’, friendly name = ‘DockerNAT’, MAC = ‘DYNAMIC’: Invalid class string (0x800401F3).
At C:\Program Files\Docker\Docker\resources\MobyLinux.ps1:419 char:5

  • throw "$args"
    
  • ~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Failed to creat…g (0x800401F3).:String) [], RuntimeException
    • FullyQualifiedErrorId : Failed to create Switch “DockerNAT”: Failed while adding virtual Ethernet switch connections.
      Internal miniport create failed, name = ‘E096274C-6F4F-47C1-9660-8BE200DD31B9’, friendly name = ‘DockerNAT’, MAC = ‘DYNAMIC’: Invalid class string (0x800401F3).

Any ideas?

I have a very similar issue also using Windows 10 with Hyper-V.

After install and a restart I see the message when attempting to start Docker for Windows Beta. I also see the message Failed to create Switch “DockerNAT”: Failed while adding virtual Ethernet switch connections. The diagnostic id is:
88EEAAF4-0386-42E9-B7F7-21652DBE55DB/2016-07-12_14-04-06
Here is the relevant log information.
` [14:03:35.671][HyperV ][Info ] Enabled workaround for Build 10586 VMSwitch issue
[14:03:49.729][HyperV ][Info ] Creating Switch: DockerNAT…
[14:03:52.269][NamedPipeServer][Error ] Unable to execute Start: Failed to create Switch “DockerNAT”: Failed while adding virtual Ethernet switch connections.

Internal miniport create failed, name = ‘3DF1D449-2605-4BEA-9803-19E80CA86DDD’, friendly name = ‘vEthernet (DockerNAT)’, MAC = ‘DYNAMIC’: One or more arguments are invalid (0x80070057). at System.Management.Automation.Interpreter.ThrowInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
[14:03:52.347][NamedPipeClient][Error ] Unable to send Start: Failed to create Switch “DockerNAT”: Failed while adding virtual Ethernet switch connections.

Internal miniport create failed, name = ‘3DF1D449-2605-4BEA-9803-19E80CA86DDD’, friendly name = ‘vEthernet (DockerNAT)’, MAC = ‘DYNAMIC’: One or more arguments are invalid (0x80070057).
[14:03:52.347][NamedPipeClient][Info ] Sending CheckInstallation()…`

I got past my issue by uninstalling docker and reinstalling it again. It worked without a reboot.

I suspect the issue could have been related to the fact Hyper-V wasn’t enabled on my machine before the installation process.

I just wanted to chime in with a recent similar issue I had with “DockerNAT” switch creation errors after moving from Docker for Windows BETA to the GA release (note I have had Docker configurations dating back to the virtual box version before the for Windows Beta this spring so my system was hardly clean). Also I am running Windows 10.

The Docker troubleshooting documentation does have a section outlining the issue under “Networking issues” and that you may have multiple VMSwitches. This was the case with me however none of the documented approaches actually showed the multiple DockerNAT instances I had on my system (and deleting/removing the DockerNAT using either PowerShell or via the “Hyper-V Manager” app always worked but resulted in the same errors after Docker restart or reinstall).

In my case there was a second disabled DockerNAT that would not show up via any of the powershell calls or in Hyper-V Manager. The only place it would show up (or where I could even ever see two instances of the DockerNAT adatper on my system) was by going to the old control panel view at > Control Panel > Network and Internet > Network Connections (which had a second disabled DockerNAT listed). You are not able to delete the second instance from this UI so to get it off the syetem I actually ended up having to drill into > Device Manager > Network Adapters (and then Delete the Hyper-V Virtual Adapter listed there).

This finally resolved things for me. One note was that under Device Manager > Network Adapters the Hyper-V adapter never indicated anything named DockerNAT however I had already deleted the other DockerNAT adapter via the method listed in the troubleshooting document and I had no other Hyper-V adapters installed so deleting this from Device Manager finally got rid of that second “ghost” adapter that wasnt showing up in any of the other view.

Everything is working for me now - hope this helps someone else who got in the same predicament as myself.

I had the same issue after installing the new windows 10 update.

I followed these instructions and fixed the problem.