Come to the New Docker, I get a new error Unable to create: The running command stopped because the preference variable "ErrorActionPreference", and here is the solution (2 solution).
First of all, don't lazy to read the error :
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The computer 'AKPC-DESKTOP' could not be resolved. Make sure you typed the machine name correctly and that you have network access.
at New-MobyLinuxVM, <No file>: line 218
at <ScriptBlock>, <No file>: line 375
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)
1. If you are seeing "
Make sure you typed the machine name correctly and that you have network access"
Solution: you need internet. please turn on your network.
2. After That, Oops we got another error, hahaha. no need to worry.
Unable to execute Start: Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Failed to create the virtual hard disk.
The system failed to create 'C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx'.
at Ensure-VHD-Path, <No file>: line 306
at New-MobyLinuxVM, <No file>: line 208
at <ScriptBlock>, <No file>: line 411 at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV.cs:line 195
at Docker.Backend.HyperV.Create(Settings settings) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV.cs:line 125
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:line 117
[13:43:17.016][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: Failed to create the virtual hard disk.
The system failed to create 'C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx'.
at Ensure-VHD-Path, <No file>: line 306
at New-MobyLinuxVM, <No file>: line 208
at <ScriptBlock>, <No file>: line 411
[13:43:17.016][Notifications ][Error ] Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Failed to create the virtual hard disk.
The system failed to create 'C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\MobyLinuxVM.vhdx'.
at Ensure-VHD-Path, <No file>: line 306
at New-MobyLinuxVM, <No file>: line 208
at <ScriptBlock>, <No file>: line 411
If you are seeing '
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Failed to create the virtual hard disk.'
Solution :
- open Command Prompt, run as Administrator, then type this one.
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
- Then
go to this folder : ( in my place
The system failed to create 'C:\Users\Public\Documents\Hyper..... so in your side maybe different. ).
C:\Users\Public\Documents\Hyper-V\Virtual Hard Disks\....
You will see an administrator prompt there. (i forget what, but Windows will show you a Windows to prompt), just allowed that, so all content there can be seen public.
- Finally, run your docker like usual.
- Case Solved
More info :
-
Docker not starting on windows 10 #214
-
Unable to create: The running command stopped because the preference variable "ErrorActionPreference" #1538
-
Can't run Docker for Windows after install for the first time #1177
Happy Wednesday
KG