Unable to start Docker in Windows 10 - Hyper-V error is thrown
Solution 1
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.
Solution 2
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.
Solution 3
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.
Solution 4
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...
Solution 5
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
Comments
-
sankar over 3 years
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)
-
RealDeepak almost 7 yearsI was facing the same issue. And I had to created a new ubuntu machine, so that I can use docker. Finally it saved me. It's working perfectly on my windows machine. Thanks
-
Jalal El-Shaer over 6 yearsSame setup regarding MacOS/Parallels .. thanks for the tip on Hypervision
-
smartmeta about 6 yearsThanks @ToddBFisher, you made my day. I think this would help many others on github.com/docker/for-win
-
user3590235 about 5 yearsthis also worked for me - SO Answer
-
Ostecke over 4 yearsThis is the only thing that worked for me. Hyper-V got back online and Docker started without a problem again. No reboot required.
-
Juliano Macedo over 4 yearsThanks a lot, it really helped.
-
letie about 4 yearsI don't have the file "WindowsVirtualization.V2.mof". Do you know why is that?