Docker - The computer 'WINDOWS10-ON-SE' co

2019-08-07 06:20发布

I am new to docker.

I have installed it but I get an error :-

Unable to execute Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop:

The computer 'WINDOWS10-ON-SE' could not be resolved

The computer WINDOWS10-ON-SE is my host Windows 10 pro VM

No VMs have been created in Hyper-V, nor any Virtual Switches

标签: docker
1条回答
Animai°情兽
2楼-- · 2019-08-07 07:04

I was also facing the same issue but it was random in nature, I found it is due to some inaccessibility of network card by the docker start script. This inaccessibility further blocks the start up process of docker.

I found one hack and it is working fine on my windows machine

Hack

Open C:\Program Files\Docker\Docker\resources\mobylinux.ps1 with any editor in admin mode. Find following code (around line 164)

$networkAdapter | Remove-NetIPAddress -Confirm:$false -ea SilentlyContinue

$networkAdapter | Set-NetIPInterface -Dhcp Disabled -ea SilentlyContinue

$networkAdapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress $switchAddress -PrefixLength ($SwitchSubnetMaskSize) -ea Stop | Out-Null

Add a return after line 165 in a new line like below and save the file.

$networkAdapter | Remove-NetIPAddress -Confirm:$false -ea SilentlyContinue

$networkAdapter | Set-NetIPInterface -Dhcp Disabled -ea SilentlyContinue

return

$networkAdapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress $switchAddress -PrefixLength ($SwitchSubnetMaskSize) -ea Stop | Out-Null

Now restart docker and after restart completion execute following commands in dos admin mode to setup the network card manually

netsh interface ipv4 set address name="vEthernet (DockerNAT)" static 10.0.75.1 255.255.255.0

You have to run this command everytime whenever you are doing system restart and docker completes start process (due to any reason). TIP : create a batch file of this command and save somewhere handy.

Note: The ps hack would get undone by any docker update. so be aware...

查看更多
登录 后发表回答