Docker Community Forums

Share and learn in the Docker community.

Failed to create Switch "DockerNAT" with comments and ideas


(Cube2222) #1

So, I too have this problem as a few other people. With the can’t create DockerNAT.

For some reason there is a ghost adapter called vEthernet (DockerNAT), which makes it impossible to use this name. I can’t find this adapter anywhere, but it’s easy to check that it’s there, as I can’t rename any adapter to be this name, as I get an error that this adapter already exists. Docker creates the switch in hyperv, and hyperv, because it can’t create vEthernet (DockerNAT), as it already exists, creates an adapter called vEthernet (DockerNAT) 2 instead. Docker is searching for an adapter called vEthernet (DockerNAT), but it’s a ghost so Docker can’t find it. Docker doesn’t get, that the adapter it wants to use is called vEthernet (DockerNAT) 2.

I’ve tried digging in the command line, in the registry and in adapter/hyperv settings.
I’ve reset hyperv, I’ve reset network setting (a function available in newest insider), reinstalled docker a few times, tried to create the switch manually. Whenever I create the DockerNAT switch manually, it gets the name vEthernet (DockerNAT) 2 in adapters. Have no idea what to do further.


"DockerNAT": Instance MSFT_NetIPAddress already exists
(Samneirinck) #2

I had tried the same things as you, the following blog post finally solved it for me: https://cloudtidings.com/2013/11/20/removing-the-ghost-hyper-v-vnic-adapter-when-using-converged-networks-after-in-place-upgrade-to-w2012r2/


(Cube2222) #3

Sadly it doesn’t work for me. Docker insists on creating vEthernet (DockerNAT) 2, same for hyperv. My hyperv also is #2. I think I’ll have to do a windows reinstall to fix all this. And first update to insider, and later turn on hyperv/docker.


(Chris Patterson) #4

I am seeing the exact same issue on 14342. I even tried to rename the adapter and it says the object already exists. I tried a work around to change the switch name in the MobyLinux.ps1 script to DockerNAT2 and that at least got me an adapter that matched and could be found. However, I then had issues with DHCP.


(Cube2222) #5

Apart from that I also tried digging into the registry, deleting anything possible, resetting the network interface… It’s a known hyperv problem and basically just remember to turn hyperv off when you’re updating your system. Ended up doing a reinstall of windows.


(Chris Patterson) #6

Thanks, that is a pain because I get updates all the time and typically at night when I am not around.