I am trying to install Docker Desktop on Windows 10 Pro 21H1, but I'm constantly getting the below error:
Component CommunityInstaller.EnableFeaturesAction failed: Not found
at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__29.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()
I have tried deleting:
C:\Program Files\
C:\Users\username\AppData\Local\Docker
C:\Users\username\AppData\Local\Docker Desktop
... and other Docker related folders multiple times.
I have WSL2 running fine on my system with Ubuntu 20.
sid_c06#LAPTOP-HJCDC6N0:~$ wsl.exe -l -v
NAME STATE VERSION
* Ubuntu-20.04 Running 2
I tried unchecking the WSL2 option during installation but then the step of starting Linux Containers on WSL2 fails when trying to start Docker Desktop after installation.
Unable to start
at Docker.Core.Pipe.NamedPipeClient.d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean executeAfterStartCleanup)
at Docker.Actions.<>c__DisplayClass27_0.b__0()
at Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass17_0.<.ctor>b__1()
Can you let me know what am I doing wrong? Also should I go with installing Docker directly on Ubuntu on WSL2 and skip Docker Desktop? I couldn't find concreate steps for same. Let me know if that is a good idea.
I performed many actions to solve it which are listed below. I believe that resetting the WMI was the key action, though.
I deleted all remaining Docker/Docker Desktop folders in Windows:
~/AppData/Local/Docker
~/AppData/Roaming/Docker
C:\ProgramData\Docker
C:\Program Files\Docker
I also uninstalled and installed back the following windows features:
Hyper-V
Windows Subsystem Linux
Windows Hypervision Platform.
Disabled Windows Service Power
Reset the WMI
Disable and stop the WMI service:
sc config winmgmt start= disabled
net stop winmgmt
Run the following commands:
Winmgmt /salvagerepository %windir%\System32\wbem
Winmgmt /resetrepository %windir%\System32\wbem
Re-enable the WMI service and reboot:
sc config winmgmt start= auto
(note that there is a blank between '=' and 'auto')
If the problem remains, then try the following steps to rebuild the repository:
Disable and stop the WMI service
sc config winmgmt start= disabled
net stop winmgmt
(note that there is a blank between '=' and 'disabled')
Rename the repository folder (located at %windir%\System32\wbem\repository) to repository.old
Re-enable the WMI service
sc config winmgmt start= auto
Reboot the machine.
Reference this SuperUser answer
Related
So I'm trying to install Docker Desktop 4.13.1 on Windows 10 but I get this error after a while,
**Installation Failed**
Component CommunityInstaller.AutoStartAction failed: Access to the registry key 'HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run' is denied.
at CommunityInstaller.InstallWorkflow.<DoHandleD4WPackageAsync>d__30.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at CommunityInstaller.InstallWorkflow.<DoProcessAsync>d__23.MoveNext()
I've tried disabling my antivirus software but that didn't help. I can't even find anything relating to this topic on the internet. I don't know how to provide the necessary permissions to Docker.
Is there any way I can fix this?
Alright, so after a lot of headbanging, I finally found a fix. This may not work for you but it's worth trying.
First, open command prompt and run,
wsl --status
If you get something like "you have an update," you're at the right place. Then run,
wsl --install -d ubuntu
Let it finish and then run,
wsl --update
Then reboot your system and open the docker installer again. It should install fine now.
I have installed the Docker and then I have started the Docker. Docker says that "Docker is starting." Then,Docker says "Docker Failed to Start". Please, Could you help me?
Docker Error Detail:
System.InvalidOperationException:
Failed to deploy distro docker-desktop to C:\Users\---\AppData\Local\Docker\wsl\distro: exit code: -1
stdout: The operation could not be started because a required feature is not installed.
stderr:
at Docker.ApiServices.WSL2.WslShortLivedCommandResult.LogAndThrowIfUnexpectedExitCode(String prefix, ILogger log, Int32 expectedExitCode) in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\WSL2\WslCommand.cs:line 146
at Docker.Engines.WSL2.WSL2Provisioning.<DeployDistroAsync>d__17.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 169
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.WSL2Provisioning.<ProvisionAsync>d__8.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\WSL2Provisioning.cs:line 78
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.WSL2.LinuxWSL2Engine.<DoStartAsync>d__25.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\WSL2\LinuxWSL2Engine.cs:line 99
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.TaskExtensions.<WrapAsyncInCancellationException>d__0.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\TaskExtensions.cs:line 29
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 67
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.ApiServices.StateMachines.StartTransition.<DoRunAsync>d__5.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.ApiServices\StateMachines\StartTransition.cs:line 92
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.Engines.Engines.<WaitCurrentTransitionsAsync>d__30.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:line 358
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Engines.Engines.<RestartAsync>d__26.MoveNext() in C:\workspaces\PR-15138\src\github.com\docker\pinata\win\src\Docker.Desktop\Engines\Engines.cs:line 250
In my scenario, I needed to install WSL 2 and my computer didn't have it.
Installing it made docker run successfully.
Try the below steps if you are installing docker for the first time.
First, we need to activate WSL from Windows.
Control Panel -> Programs -> Turn Windows features Turn On or Off
You need to check
Windows Subsystem For Linux
Windows Hypervisor Platform
Virtual Machine Platform
Then Click ok
After that, you need to Enable WSL 1 and update it to WSL 2 (https://learn.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps)
To Install WSL 1 which comes built-in, open PowerShell as Administrator and run:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
After that download the WSL 2 update from Microsoft. Use below this: WSL2 Linux kernel update package for x64 machines
After installing the above package, you need to set WSL 2 as the default version.
Open PowerShell as Administrator and run:
wsl --set-default-version 2
Now restart your computer. Now your docker should work.
Please note that to update to WSL 2, you must be running Windows 10.
For x64 systems: Version 1903 or higher, with Build 18362 or higher.
For ARM64 systems: Version 2004 or higher, with Build 19041 or higher.
My Solution:
I have checked the Prerequisites for Docker. I have applied the second step in prerequisites. (Windows Subsystem for Linux Installation with Manual Installation Steps) It has fixed the error for me.
If you get an error like this (during this installation process):
WslRegisterDistribution failed with error: 0x80370114 Error: 0x80370114 The operation could not be started because a required feature is not installed. (I encountered this error.) Please, apply this.
These steps are quoted from the "this" named hyperlink above.
1. Open "Windows Security"
2. Open "App & Browser control"
3. Click "Exploit protection settings" at the bottom
4. Switch to "Program settings" tab
5. Locate "C:\WINDOWS\System32\vmcompute.exe" in the list and expand it
6. Click "Edit"
7. Scroll down to "Code flow guard (CFG)" and uncheck "Override system settings"
8. Start vmcompute from powershell "net start vmcompute"
9. Then go back and command wsl --set-default-version 2
I have fixed my problems like that. Good luck :)
Docker failed to start WSL 2 update
I just did this on powershell
wsl --install -d Ubuntu
wsl --update
wsl --shutdown
The problem is in WSL as it becomes unresponsive and returns a service error. Follow the below steps
1. Uncheck the Windows Subsystem for Linux in Windows Features
2. Restart
3. Turn the feature back on
4. Re-apply the WSL2 update
5. Restart
The combination of the above answer and installation of new destro worked for me
Uninstall existing installation
Install With Admin privilege
Restart
Follow the accepted answer here https://answers.microsoft.com/en-us/insider/forum/all/wsl-2-installing-linux-failed-error-code/bae391d1-4215-4d93-b0c4-3d96404a7c74
Install a linux destro follow this https://learn.microsoft.com/en-us/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package
Launch Linux desktop as admin
I was facing the same problem in my windows cooperate desktop. Unfortunately most of the windows settings changes are not available for users and controlled by IT team. What I did to make docker running is
Open Docker Desktop
Go to Settings
Turn off "Use the WSL 2 based engine" which switch to legacy Hyper-V
I know this is not ideal but atleast got docker working.
Fyi -- jprism's answer worked for me.
My issues were...
Docker install worked but would not start successfully, I got "WSL not installed" message.
Tried the WSL installation instructions from
https://learn.microsoft.com/en-us/windows/wsl/install
Default WSL installation was not found from PS session. Would not run from the command line without specifying the distro. Worked when I explicitly specified the default distro with the -d argument
Enabled WSL Subsystem as per https://www.windowscentral.com/install-windows-subsystem-linux-windows-10
Enabled all Hyper-V options in Control Panel > Programs and features > Turn Windows features on or off in addition WSL Subsystem
Finally as per jprism modified Docker settings to use Hyper-V
this can help you
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
run this in powershell.
WSL2 cannot running.Reset winsock can fix it. Use following steps.
PS C:\WINDOWS\system32> wsl.exe --shutdown
PS C:\WINDOWS\system32> wsl.exe
The attempted operation is not supported for the type of object referenced.
PS C:\WINDOWS\system32> netsh winsock reset
Successfully reset the Winsock Catalog.
You must restart the computer in order to complete the reset.
After reboot ur system please run this command:
PS C:\WINDOWS\system32> wsl.exe
This will solve this error. I got it resolved at my machine.
Much much easier solution:
On Windows 11 with Docker Desktop v4.13.1 everything works fine with both Linux and Windows containers.
Than after a couple of restarts I suddenly get the same error (Docker failed to start etc.)
Click on Troubleshoot in the header menu. Here you can Clean / Purge data, after that it works again.
Uninstall Docker Desktop
Delete the following:
delete %appdata%\Docker*
delete %appdata%\Docker Desktop*
delete %LOCALAPPDATA%\Docker*
Reinstall Docker Desktop
Source
What fixed this for me was
Hit windows key, type "cmd", hit enter
Right click menu bar, select "Properties"
Uncheck "Use legacy console"
I installed docker desktop on Windows 10 through 'Docker Desktop Installer'.
After installation I logged off and logged in. It crashes on start up after some time stating the message as below
Docker.Core.Backend.BackendDestroyException:
One or more errors occurred.
at Docker.Core.Pipe.NamedPipeClient.<TrySendAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Docker.Core.Pipe.NamedPipeClient.Send(String action, Object[] parameters)
at Docker.Actions.DoStart(SynchronizationContext syncCtx, Boolean showWelcomeWindow, Boolean withNotifications)
at Docker.Actions.<>c__DisplayClass26_0.<StartAsync>b__0()
at Docker.ApiServices.TaskQueuing.TaskQueue.<>c__DisplayClass18_0.<.ctor>b__1()
System.AggregateException:
One or more errors occurred.
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at Docker.Backend.LifecycleClient.DockerStart()
at Docker.Backend.ContainerEngine.Linux.DoStart(Settings settings, String daemonOptions, Credential credential)
at Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions, Credential credential)
Docker.Core.HttpBadResponseException:
unable to fetch daemon.json: Get http://unix/engine/daemon.json: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
at Docker.Backend.HttpClientExtensions.<ParseResponseBodyAsJsonAsync>d__2`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Docker.Backend.HttpClientExtensions.<GetJsonAsync>d__0`1.MoveNext()
I uninstalled, re-started my PC and installed by selecting 'Windows Container'. Then after the restart checked on running docker. It started successfully. But when I switch to Linux containers it again fails with the same error message above.
The main goal to fix this is:
Press windows "start" button
Enter by keyboard services + enter
Find two of them : "Hyper-V Virtual Machine Management" and "Hyper-V Host Computer Service"
(on each service)click mouse right-button, select "properties" and change in opened window "startup type" to "manual", then "ok" button.
Click again on each mouse right-button and select start
Press windows "start" button, enter "hyper-v", it will show you hyper manager, open it
In hyper-v manager select "connect to server", from pop-up select "local computer"
Run your desktop docker it is probably working now with no crashes and exceptions.
What helps is already given in the other answers, i just try to be more specific and try to avoid some traps by using Environment-Variables in the paths and append some details and reasoning for the core problem:
First of all, make sure the "Docker Desktop Service" is running, which should be the case once you logged out and in again directly after install or rebooted the system. To check the status of services do either click/press/touch the Start-Button/Windows-Key to initiate the integrated Desktop-Search and type:
services
or type
services.msc
in either the desktop-search as stated before, or open the Run-dialog by pressing and holding down the "Windows-Key" and the "R"-key right after it as well, then release the keys. In the "Run-Dialog" type
services.msc
Use the command-line-interface (CLI)-tool "DockerCli.exe" with the attribute/option "SwitchDaemon". For this you need to open a command-line, either PowerShell or CommandShell, you do this by either click/press/touch the Start-Button/Windows-Key to initiate the integrated Desktop-Search and type:
cmd
for the CommandShell, or for the PowerShell:
powershell
or you type "cmd.exe" or "powershell.exe" in either the Desktop-Search as stated before, or you
open the Run-dialog by pressing and holding down the "Windows-Key" and the "R-Key" right after it as well, then release the keys. In the "Run-Dialog" type "cmd.exe" or "powershell.exe".
To actually switch the Docker-Service operation-mode use the following:
If you are in the Command-Shell/cmd.exe type:
cmd -C "%ProgramFiles%\Docker\Docker\DockerCli.exe -SwitchDaemon"
Or if you are in PowerShell type:
& "Env:ProgramFiles\Docker\Docker\DockerCli.exe -SwitchDaemon"
If all that is too complex for you and you want to try a "fire&forget"-approach - relying on the assumption that the Docker-Desktop-Service is indeed running, because you either logged out and back in after install or you already rebooted your system, you may use the Run-Dialog (to open via Win+R) and paste the following line:
powershell.exe & "$Env:ProgramFiles/Docker/Docker/DockerCli.exe -SwitchDaemon"
This will work because it explicitly executes the PowerShell (which is part of Windows 10 and Docker Desktop only runs on Windows 10) and passes to it the command DockerCli.exe -SwitchDaemon.The path is determined via the System-Environment-Variable ProgramFiles which will resolve to your System-Root and Program-Files directory (in most cases "C:\Program Files", but can also be on a manually set drive-letter, e.g. "B:" (which is often used on embedded systems to prevent automatic creation of swap-files), so on "B:\Program Files" in that case.
It relies on the standard install-path of Docker Desktop on Windows 10 systems, if you changed it you have to adjust the path accordingly. You will have no feedback. Just start "Docker Desktop" from your Start-Menu after you pasted and executed the command from the Run-Dialog.
The path in all examples is set in quotes ("") to guarantee that it can be executed. This would be a necessity as well if you for example want to prepare a Shortcut on the Desktop for first use after deployment, e.g. titled "Run this once (if Docker Desktop fails to start)". This way you can make it part of an image with Docker preinstalled.
Be aware that the main problem is that Docker uses WSL2 to provide its Linux-based containers (on Windows 10 Home exclusively) and that to run Windows-Containers Hyper-V needs to be enabled, sadly the latter contradicts with WSL2 on Windows 10 Desktop operating systems. You can enable Hyper-V afterwards, together with Virtual-Machine-Services and Windows-Containers via Windows 10 Features, but it is not guaranteed it will work toegther with WSL2.
Click on the Start button
Then type services
Search for Docker Desktop Services.
Click on that
On the top left click on stop service
Then click on start service.
now open windows powershell as administrator
type docker
this will show you the list of commands
after that type docker images
this will show you the following error
error during connect: This error may indicate that the docker daemon is not running.
After that run this command
& 'C:\Program Files\Docker\Docker\DockerCli.exe' -SwitchDaemon
and then run the following command
docker images
This will solve your problems
The solution for me was to enable virtualization for my CPU in my computer's BIOS. Docker relies on virtualization to make containers work. For me, when it was disabled, Docker Desktop kept crashing and restarting and unhelpfully giving me very little information.
Here's a helpful page with some details on how to enable virtualization:
https://bce.berkeley.edu/enabling-virtualization-in-your-pc-bios.html
The short instructions are:
Reboot your computer.
Press DEL or F2 or whatever it is for your computer to get into the BIOS.
Look for CPU settings, then find something called VT-x, AMD-V, SVM, or Vanderpool. Enable it.
Save settings and restart your computer.
You should be open Hyper-V section.Docker doesn't work without Hyper-V.
How to open Hyper-V section:
Right click on the Windows button and select 'Apps and Features'.
Select Programs and Features on the right under related settings.
Select Turn Windows Features on or off. Select Hyper-V and click OK.
The FIX IS SIMPLE...
If you are using Docker Desktop for Windows, go to the System Tray in the lower right corner of your Windows screen, right-click the docker whale icon, and in the Docker settings popup choose Switch to Windows containers...
You cannot use the Linux Containers unless you install and are running a Linux Container host VM like Moby VM running under HyperVisor and also install and run the Docker Daemons and all its dependencies.
I would just use Windows Containers. Otherwise, you are looking at a larger setup on your Windows computer.
Updating my Windows version seems to fix this problem. I had the same error, but after updating Windows, Docker is working like a charm.
I just installed Docker on Windows 10.
When I run Docker as an administrator I get the following error:
Unable to create: The running command stopped because the preference
variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V
encountered an error trying to access an object on computer 'WP2975' because
the object was not found. The object might have been deleted. Verify that
the Virtual Machine Management service on the computer is running.
at New-Switch, <No file>: line 121
at <ScriptBlock>, <No file>: line 411
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.DoStart(SynchronizationContext syncCtx, Boolean
showWelcomeWindow, Boolean executeAfterStartCleanup) in
C:\workspaces\stable-
18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 92
at Docker.Actions.<>c__DisplayClass19_0.<Start>b__0() in
C:\workspaces\stable-
18.09.x\src\github.com\docker\pinata\win\src\Docker.Windows\Actions.cs:line 74
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 checked if Hyper-V is running on the computer.
I also did the following in powershell:
Ensure Windows Hyper-V featutes are enabled by running PowerShell cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All -Verbose
Ensure Windows Containers feature is enabled by running PowerShell cmdlet:
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All -Verbose
Ensure Hypervisor is set to auto start in the Boot Configuration Database (BCD)
by running in elevated command prompt the command:
bcdedit /set hypervisorlaunchtype Auto
( Found it on: Failed to start the virtual machine 'MobyLinuxVM' because one of the Hyper-V components is not running )
But nothing helps.
I also reinstalled docker two times.
Please do make sure that the following three windows services are in running state
HV Host Service
Hyper-V Host Compute Service
Hyper-V Virtual Machine Management
If Windows 10 you're referring to has an ancient edition (lower then anniversary, i.e. 1607) there is no chance in hell you can get it working. To check version of your OS run 'winver'. The problem with these editions is that they don't support nested virtualization Docker require.
Now, it's not clear WHERE are you running your VM. If it's VMWare on your PC it should be relatively easy to fix, but if it's Cloud, can be a different story. The thing is that in Azure, for instance, not all VMs support nested virtualization, so if you hastened to provision a VM, it might be a problem. If you want to get it right, use v3 VM types and up (refer this article for more info).
In my case 'HV Host Service' didn't work as well, but fortunately I was able to resize a VM to a proper tier (v3) and voila! Docker started right away.
I get the below error while starting of docker in Windows 10. Anyone can guide me to install docker correctly?
Unable to create: The running command stopped because the preference variable
"ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered
an error trying to access an object on computer 'XXXX' because the object was not
found. The object might have been deleted, or you might not have permission to
perform the task. Verify that the Virtual Machine Management service on the
computer is running. If the service is running, try to perform the task again by
using Run as Administrator.
at New-MobyLinuxVM, <No file>: line 242
at <ScriptBlock>, <No file>: line 362
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)
Versions
OS : Windows 10 Enterprise
Version : 1607
OS Build : 14393.576
Docker Version : 1.12.3 (Stable)
Run “MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof” from command prompt in admin mode.
No need to restart machine as well after this execution, it worked for me.
I have also faced this same issue. I have solved it by removing all MobyLinuxVM virtual machines. Following are its steps.
Open Hyper-V Manager
Select all MobyLinuxVM from Virtual Machines.
Right click and delete all of these virtual machines.
Restart docker.
These steps has solved this issue on my system.
Assuming you are trying to run a Windows container:
Right click on the Docker system tray icon, then select “Switch to Windows Containers”.
It will eventually have you reboot the system, but will no longer attempt to run the MobyLinuxVm as mentioned in your error message.
If it helps anyone, I am on Apple hardware (MacOS) running a Windows 10 VM via Parallels. I also made sure that under my parallel settings > Processors and Memory > Advanced, I had Hypervision applications enabled.
This issue is very similar to this the another question Docker - The computer 'WINDOWS10-ON-SE' could not be resolved
See my answer at https://stackoverflow.com/a/45099242/279272
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...
to install docker, BIOS-level Hardware Virtualization support is required.
so you can do the following..
-Ensure that hardware virtualization support is turned on in the BIOS settings in your mother board settings when you start your computer, under (system security => virtualization technology VTX => enable it) then Save the BIOS settings and boot up the machine normally. then enable hyper v if it was not enabled by running this command in your powershell as an admin:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
For me updating windows 10 pro to version 1809 fixed the issue
On windows 10, I fixed the issue by executing the steps below:
French Windows version:
Close Docker Desktop
Go to "Contrôle des applications et du navigateur"
Click on "Paramètre d'exploit protection" under "Exploit protection"
Go to the tab "Paramètres du programme"
Search "C:\Windows\System32\vmcompute.exe" or "vmcompute.exe"
Click on update and untick all the checkboxes related to all the configurations and then apply
Run Docker Desktop again
English Windows version:
Close Docker Desktop
Go to "App & browser control"
Click on "Exploit protection settings" under "Exploit protection"
Go to the tab "Program settings"
Search "C:\Windows\System32\vmcompute.exe" or "vmcompute.exe"
Click on update and untick all the checkboxes related to all the configurations and then apply
Run Docker Desktop again
Hope this will help someone else.
when you starting windows and starting docker just a right click docker in right bottom bar and switch to windows container