Navcontainerhelper: Custom docker transparent network disppeared after server 2019 reboot

Created on 12 Dec 2018  路  15Comments  路  Source: microsoft/navcontainerhelper

I have a problem when I create a container for Business Central OnPrem or bcsandbox on Server 2019 Standard (Desktop) and bind it to a transparent network.

Everything will work fine until you restart Windows Server 2019. After restarting Server 2019, the docking networks have disappeared or been recreated under a new ID.

The new ID means that the created containers can not be restarted.
Since we only use Docker environments for our Business Central and AL Extension training (previously on Server 2016, where everything worked flawlessly), this is a mission critical error for us, and we urgently need help with it.

Expected behavior

An created custom docker network will continue to exist after the server is restarted.

Actual behavior

After rebooting the server, both the custom transparent network and the standard docker network (nat) disappeared.
Due to this behavior, containers that use the custom network (transparent network) can no longer be started!

Information

Windows Version: Windows Server 2019 Standard (Desktop)
Docker for Windows Version: 18.09.0

Steps to reproduce the behavior

  1. Create a new network (docker network create -d transparent --subnet=192.168.60.0/24 --gateway=192.168.60.1 tlan
  2. Check networks (docker network ls)
  3. Reboot Windows Server 2019
  4. Check networks (docker network ls) --> Networks "nat" and "tlan" disappeared!
Unrelated to BcContainerHelper

Most helpful comment

I am going to do at brand new Win Srv 2019 standard installation the next few hours and going to write down what I have done to test if the problem can be "reactivated" -

Which version are you using of Docker? the desktop version or the Install-Module version?

All 15 comments

I don't think this has anything to do with NAV/BC containers nor navcontainerhelper and you probably can find better answers on Docker forums.
In fact, I googled your title and found this:
https://forums.docker.com/t/transparent-network-not-working-for-windows-server-core-container/44189
Which states:
Previous link is no longer valid, so I鈥檓 just writing the answer, you need to enable mac address spoofing to get this to work:
Get-VMNetworkAdapter -VMName | set-VMNetworkAdapter -MacAddressSpoofing On
Regards,
Sebastian.

Not sure if that is the problem, but you can try.

I Actually had the same issue and my fix was to pretty much the same (I did not do the suggested powershell line - but on my Hyper-V image I enabled the MacAddressSpoofing. Tomato=tomato ;-)

I have turned on the macddressspoofing. The problem is that the Docker networks disappear after restarting the Server 2019 Hyper-V image (my docker host). I do the same on Server 2016 everything is OK.

Regards,
J枚rg

@ajkauffmann - have you seen this before?

Yes, I have exactly the same experience on Win 10 1809.

The default nat network (bridge) from Docker is recreated after every reboot, with different scope. And if switch off the default nat network (with bridge:none in the daemon.json) and create a custom nat network, it disappears after a reboot and is not recreated at all.

The same seems to happen with Docker EE for Windows Server 2019. I've seen @waldo1001 reporting the this behavior on his VM.

So far I haven't found any solution. The default nat network that is created by Docker works, although it is in a different scope after each reboot. But thanks to the -updatehosts parameter, it's not a big deal. However, only BC containers update the hosts file, a portainer container doesn't do that. So that needs to be pointed to the correct ip address after each reboot. Which is very annoying...

@JoergBrugman - if you are in desperate need of this, your only solution might be to revert to server 2016 - all images are still available for both.
You might want to file this problem on Docker Forums, as it is more likely that they can fix the issue.

I am going to do at brand new Win Srv 2019 standard installation the next few hours and going to write down what I have done to test if the problem can be "reactivated" -

Which version are you using of Docker? the desktop version or the Install-Module version?

Just FYI:

Same issue here, by the way :-). It always disappears after restarting Win2019. When I have running containers, I'm not able to restart, because of the missing network....

Windows updates makes it even worse - not able to create the transparent network anymore, without messing up the current network (changes IP address, and no way to undo..).

But I agree - it doesn't have anything to do with navcontainerhelper...

      I am going to do at brand new Win Srv 2019 standard installation the next few hours and going to write down what I have done to test if the problem can be "reactivated" -

Which version are you using of Docker? the desktop version or the Install-Module version?

I've used Install-Module Version

HI Kamil,

That's right. But this issue has existed since 11.09.18 without any feedback. So I thought I was trying to escalate it once, because that certainly affects a lot of Business Central developers in equal measure.

Maybe an MVP from this community has good connections to the Docker team and can escalate that better than I did :-)

Best regards,
J枚rg

Seems like the problem is known but not prioritized: https://github.com/moby/moby/issues/38358#issuecomment-449791304

I posted a possible solution workaround here: https://github.com/moby/moby/issues/38358#issuecomment-459253231

Thanks a lot @marknitek

According to this https://github.com/moby/moby/issues/38358#issuecomment-466202747 we now have a fix that is backported and also a workaround by setting a reg key

Was this page helpful?
0 / 5 - 0 ratings