How do I handle errors with the Host Network Service (HNS)?

Sometimes the Docker network gets corrupted and the Host Network Service is affected. You must use the Microsoft Network cleanup script to resolve your issues.

What to do

Note: All PowerShell commands must be run from an elevated PowerShell session.
  1. Get the Microsoft Network Cleanup Script from the MicrosoftDocs Virtualization documentation.
  2. Run the cleanup script with the following syntax:
    .\WindowsContainerNetworking-LoggingAndCleanupAide.ps1 -Cleanup -ForceDeleteAllSwitches
  3. If the cleanup script runs successfully, restart your computer and then run the ./scripts/paw.ps1 script.
  4. If the cleanup script fails, run the following commands from PowerShell window:

    • docker container run hello-world:nanoserver 
    • docker run -p 80:80 hello-world:nanoserver 
  5. If neither of the previous steps resolve the issue, review the resources and instructions available at https://learn.microsoft.com/en-us/virtualization/windowscontainers.

What to do next

In some cases, you might need to re-image the server because of a Docker network corruption at the registry level. Contact IBM® Support to discuss available options or any further troubleshooting.