3

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.

Dumi
  • 1,414
  • 4
  • 21
  • 41

1 Answers1

7

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.

meJustAndrew
  • 6,011
  • 8
  • 50
  • 76
Prafull
  • 79
  • 1
  • This did not work for me. So, unfortunately, not a 100% solution :~( – James Nov 28 '19 at 00:01
  • 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 https://superuser.com/questions/1152280/get-net-powershell-cmdlets-failing-with-invalid-class – Tomáš Silný Jan 07 '20 at 12:29
  • Thanks, it works great, I think there was some error when Windows updating. – Nguyen Tran Jan 13 '20 at 04:25