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

11,730

Follow these steps:

  1. Uncheck Hyper-V option by going to Turn Windows Feature On or Off
  2. Restart the Windows machine (let docker complain about Hyper-V not available)
  3. Enable Hyper-V again
  4. Restart the machine (let docker start again).

Now it should be working.

Share:
11,730
Thilina Nakkawita
Author by

Thilina Nakkawita

With more than 8 years of experience, an expert in C#, ASP .NET & MVC, and SQL Server with database analysis and design. Skilled in developing business plans, requirements specifications, user documentation, and architectural systems research.

Updated on June 09, 2022

Comments

  • Thilina Nakkawita
    Thilina Nakkawita almost 2 years

    I have installed the Docker for Windows in my windows 10 machine. When I'm trying to "switch to linux container" from "windows container", I'm getting an error.

    enter image description here

    Unable to start: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: 'MobyLinuxVM' failed to start.

    Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running.

    'MobyLinuxVM' failed to start. (Virtual machine ID 2E563FF9-8F28-49F9-A0D1-4E64BCCC3438)

    The Virtual Machine Management Service failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running (Virtual machine ID 2E563FF9-8F28-49F9-A0D1-4E64BCCC3438). at Start-MobyLinuxVM, : line 296 at , : line 412 at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters) in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeClient.cs:line 36 at Docker.Actions.<>c__DisplayClass28_0.b__0() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 305 at Docker.WPF.TaskQueue.<>c__DisplayClass19_0.<.ctor>b__1() in C:\workspaces\stable-18.09.x\src\github.com\docker\pinata\win\src\Docker.WPF\TaskQueue.cs:line 59

    I have followed the similar question on SO (Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running) but the solutions which posted in the question didn't work for me.

  • James
    James over 4 years
    This did not work for me. So, unfortunately, not a 100% solution :~(
  • Tomáš Silný
    Tomáš Silný about 4 years
    It leads to a different type of error in my case: 'Unable to destroy - The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Invalid class' which I was able to fix by following WMI repository fix stated at superuser.com/questions/1152280/…
  • Nguyen Tran
    Nguyen Tran about 4 years
    Thanks, it works great, I think there was some error when Windows updating.