Skip to content

Clean Docker-preview install on Server 1709 does not correctly configure NAT #1366

@gh2k

Description

@gh2k

Expected behavior

Installing Docker on Windows Server 1709 should install a Windows NAT mapping.

Actual behavior

Installing Docker on Windows Server 1709 does not create a Windows NAT mapping.

Information

On a fresh Server 1709 VM I installed: Windows Updates, Hyper-V and Docker preview.

After this, running Debug-Containerhost.ps1 reports that Windows NAT should exist, and doesn't:

 [-] A Windows NAT is configured if a Docker NAT network exists 552ms                                            
   Expected {0} to be greater than or equal to {1}                                                               
   226:        $winnatCount | Should Not BeLessThan $natCount                                                    
   at <ScriptBlock>, <No file>: line 226                                  

There is a NAT network created by default:

NETWORK ID          NAME                DRIVER              SCOPE                                      
6414f33b75dc        nat                 nat                 local                                                
ba885f554590        none                null                local                      

Further to this, swarm ingress routing does not work. For example, after running the commands:

docker network create -d overlay test
docker service create --name whoami --publish 8080:8080 --network test stefanscherer/whoami:1709
# for testing
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled false

should result in a service listening on the server's LAN IP on port 8080. It doesn't.

Additionally: As described by @kevinbosman in this comment: #1255 (comment) - Attempting to add the NAT mapping manually results in a 'duplicate name exists' error

Steps to reproduce the behavior

  1. Install a fresh Server 1709 VM - (resulting in:)
Major  Minor  Build  Revision                                                                                    
-----  -----  -----  --------                                                                                    
10     0      16299  0                                                  
  1. Install latest updates using sconfig
  2. Install hyper-v: Add-WindowsFeature Hyper-V -IncludeManagementTools -Restart
  3. Install docker preview:
Install-Module DockerProvider
Install-Package Docker -ProviderName DockerProvider -RequiredVersion preview
  1. Restart the computer
  2. Run Debug-Containerhost.ps1

You should see the error:

 [-] A Windows NAT is configured if a Docker NAT network exists 552ms                                            
   Expected {0} to be greater than or equal to {1}                                                               
   226:        $winnatCount | Should Not BeLessThan $natCount                                                    
   at <ScriptBlock>, <No file>: line 226                                  

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions