The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V was unable to find a virtual machine with name "MobyLinuxVM".
Expected behavior
Docker starts successfully.
Actual behavior
Docker fails to start.
Information
- Diagnostic ID : 5B51E731-80AB-44B2-9D06-CCD9C1B1D30E/2017-03-14_22-03-52
- Windows 10 Education. 1607. Build 14393
Getting this error when running docker. 'Unable to download logs: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V was unable to find a virtual machine with name "MobyLinuxVM".'
[22:02:12.033][NamedPipeServer][Error ] Unable to execute Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Element not found.
at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters)
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings)
at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass8_0.<Register>b__0(Object[] parameters)
at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)
[22:02:12.365][NamedPipeClient][Error ] Unable to send Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Element not found.
[22:02:12.365][Notifications ][Error ] Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Element not found.
Reinstalled many times. Noticed that in my Hyper-V manager there's no MobyLinuxVM? Tried to manually add it by selecting .iso in the resources folder but no luck. Also noticed there's no DockerNAT network adapter? I think my Hyper-V might have messed up but not sure how to 'reset' it :(
Steps to reproduce the behavior
Run Docker.
Experiencing the same issue - also on build 14393
Tried these commands
.\MobyLinux.ps1 -Destroy
.\MobyLinux.ps1 -Create
But during create, it'll create the switch then throw this
New-NetIPAddress : Element not found.
At C:\Program Files\Docker\Docker\resources\MobyLinux.ps1:164 char:23
+ ... rkAdapter | New-NetIPAddress -AddressFamily IPv4 -IPAddress $switchAd ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (MSFT_NetIPAddress:ROOT/StandardCimv2/MSFT_NetIPAddress) [New-NetIPAddress], CimException
+ FullyQualifiedErrorId : Windows System Error 1168,New-NetIPAddress
Also got this problem.
Windows 10 VM Name : WINDOWS10-ON-SE Host Operating System : Windows Server 2016 OS: Windows 10 Pro Edition: Professional Id: 1607 Build: 14393 BuildLabName: 14393.953.amd64fre.rs1_release_inmarket.170303-1614
Crash Report :- 2F5FE5D1-214B-4B19-9764-CE5F5036E5C6/2017-03-22_23-03-54
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. Make sure you typed the machine name correctly and that you have network access.
at Get-Vhd-Root,
I've 'refreshed' windows 10, i think my hyper-v was messed up. All working now.
I had the same experience - I think perhaps this points to needing better error reporting if the Hyper-V VM cannot be started.
Is there a released version with this fix?
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 every time 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...
When I execute netsh interface ipv4 set address name="vEthernet (DockerNAT)" static 10.0.75.1 255.255.255.0 I get
The filename, directory name, or volume label syntax is incorrect.
I applied the hack from @mukeshkagarwal, and this way I got my Docker working. Thanks!
The only problem is that the command netsh interface ipv4 set address name="vEthernet (DockerNAT)" static 10.0.75.1 255.255.255.0 failed with message Element not found.. This is actually the same message I got in Docker error report, so this seems to be the issue.
In order to check that I typed netsh interface ipv4 show interfaces, but there was no vEthernet (DockerNAT). I found it in Control Panel\Network and Internet\Network Connections window and applied the settings manually in GUI window.
quick fix : run docker as Administrator. Seems like authorization issues.
This doesnt have any connection with the windows edition of the user? Seems like HYPER-V can only be installed on Windows 10 Pro+ https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v
Hi guys!
I solved my problem openning the Hyper-V and applying the right directory for my HD and Conf folders. To check if it's your problem as well, please follow the steps:
1 - Open Hyper-V 2 - Right-click on the virtual machine (if you have it already created) 3 - Click on Hyper-V settings 4 - Check the "Virtual Hard Disk" and "Virtual Machine" directories.
I started to have this issue after trying to change my files to another directory.
I would get this message every time I logged in. I finally solved it simply by opening the Hyper-V console and stopping and then restarting the service. I suppose rebooting would accomplish the same thing.
This fixed the issue for me and its so amazing :)
https://stackoverflow.com/questions/54181239/unable-to-start-the-running-command-stopped-because-the-preference-variable-er/54485998#54485998
Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.
If you have found a problem that seems similar to this, please open a new issue.
Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked