Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Docker cannot resolve computer name at start (at New-Switch) #3389
Stopped with error:
Steps to reproduce the behavior
I've now found the reason for the problem, but I am not able to solve it myself (since I do not have the Docker for Win sources).
1.) Hyper-V cannot correctly resolve the "localhost" when your machine resides inside of a domain
My first step to a solution was to modify the "MobyLinux.ps1" script in the following way:
1.) Check if the computer is part of a domain -> If yes define a variable $cname = computername+domain
This solution worked pretty well, I can create the VM but then, the docker executable seems to execute additional Hyper-V commands between 'Create' and 'Start' with no explicit computer name definition. Therefore the Hyper-V commands are executed for the default computer which is "localhost" (which does not work for computers in domains).
Please find my latest log and "MobyLinux.ps1" attached. Maybe you guys can help me further and modify the executable so it works also for computers in domains.
I've now found a temporary solution for my problem by further "hacking" the script "MobyLinux.ps1".
I managed to get docker to start by ,modifying the globally exposed $PSDefaultParameterValues for the required Hyper-V command with my "correct" hostname as computername parameter.