for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Docker won't start with Hyper-V activated

Open Ephasme opened this issue 8 years ago • 20 comments

Expected behavior

Docker to start and run normally

Actual behavior

Docker stops at the beginning and gives me a crash windows

Information

Version: 17.12.0-ce-win47 (15139) Channel: stable Sha1: 9c692cd5b38166289573183371647d915f300292 Started on: 2018/03/04 10:19:36.658 Resources: C:\Program Files\Docker\Docker\Resources OS: Windows 10 Education Edition: Education Id: 1709 Build: 16299 BuildLabName: 16299.15.amd64fre.rs3_release.170928-1534 File: C:\Users\Loup\AppData\Local\Docker\log.txt CommandLine: "C:\Program Files\Docker\Docker\Docker for Windows.exe" You can send feedback, including this log file, at https://github.com/docker/for-win/issues [10:19:36.769][GUI ][Info ] Starting... [10:19:37.039][Tracking ][Info ] Crash report and usage statistics are enabled [10:19:37.042][SegmentApi ][Info ] Usage statistic: appLaunched [10:19:37.982][NPS ][Info ] NPS user ceated on :2/19/2018 3:40:44 PM -08:00, last survey : 1/1/0001 12:00:00 AM +00:00 [10:19:37.983][SegmentApi ][Info ] Usage statistic: heartbeat [10:19:37.985][SegmentApi ][Info ] Usage statistic: Identify [10:19:38.119][NamedPipeClient][Info ] Sending Version()... [10:19:38.137][NamedPipeClient][Info ] Received response for Version [10:19:10.824][BackendServer ][Info ] Started [10:19:38.134][NamedPipeServer][Info ] Version() [10:19:38.134][NamedPipeServer][Info ] Version done in 00:00:00. [10:19:38.145][NamedPipeClient][Info ] Sending Start(Docker.Core.Settings, Docker.Core.DaemonOptions)... [10:19:38.148][NamedPipeServer][Info ] Start(Docker.Core.Settings, Docker.Core.DaemonOptions) [10:19:38.152][PowerMode ][Info ] Stop [10:19:38.153][HyperV ][Info ] Stop [10:19:38.184][PowerShell ][Info ] Run script with parameters: -Stop True... [10:19:38.192][PowerShell ][Info ] Creating a Runspace Pool... [10:19:38.457][PowerShell ][Info ] Runspace Pool created (Min=1, Max=2) [10:19:38.554][HyperV ][Info ] Script started at 10:19:38.538 [10:19:40.107][HyperV ][Info ] Module loaded at 10:19:40.106 [10:19:40.246][HyperV ][Info ] VM MobyLinuxVM does not exist [10:19:40.247][HyperV ][Debug ] [stop] took 00:00:02.0840015 to run [10:19:40.247][OptimizeDisk ][Info ] Optimize [10:19:40.247][PowerShell ][Info ] Run script... [10:19:40.287][Moby ][Info ] Stop [10:19:40.293][PowerMode ][Info ] Start [10:19:40.293][HyperVGuids ][Info ] Installing GUIDs... [10:19:40.294][HyperV ][Info ] Create [10:19:40.294][PowerShell ][Info ] Run script with parameters: -Create True -VhdPathOverride -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\docker-for-win.iso... [10:19:40.295][HyperVGuids ][Info ] GUIDs installed [10:19:40.296][Firewall ][Info ] Removing all existing rules... [10:19:40.300][HyperV ][Info ] Script started at 10:19:40.300 [10:19:40.315][Firewall ][Info ] All existing rules are removed. [10:19:40.316][Firewall ][Info ] Opening ports for C:\Program Files\Docker\Docker\Resources\com.docker.proxy.exe... [10:19:40.318][HyperV ][Info ] Module loaded at 10:19:40.318 [10:19:40.320][Firewall ][Info ] Opening ports for SMB... [10:19:40.326][Firewall ][Info ] Ports are opened [10:19:40.650][HyperV ][Info ] Creating Switch: DockerNAT... [10:19:40.955][Linux ][Error ] Failed to start: Unable to create: L’exécution de la commande s’est arrêtée, car la variable de préférence « ErrorActionPreference » ou le paramètre courant a la valeur Stop : Hyper-V a rencontré une erreur lors d’une tentative d’accès à un objet sur l’ordinateur « DESKTOP-3MP242O », car l’objet est introuvable. L’objet a peut-être été supprimé. Vérifiez que le service de gestion d’ordinateurs virtuels est en cours d’exécution sur l’ordinateur. à New-Switch, : ligne 132 à , : ligne 409. Let's retry [10:19:40.999][HyperV ][Info ] Hyper-V is running [10:19:40.999][PowerMode ][Info ] Stop [10:19:41.000][HyperV ][Info ] Stop [10:19:41.000][PowerShell ][Info ] Run script with parameters: -Stop True... [10:19:41.006][HyperV ][Info ] Script started at 10:19:41.006 [10:19:41.025][HyperV ][Info ] Module loaded at 10:19:41.025 [10:19:41.222][HyperV ][Info ] VM MobyLinuxVM does not exist [10:19:41.225][HyperV ][Debug ] [stop] took 00:00:00.2249983 to run [10:19:41.225][OptimizeDisk ][Info ] Optimize [10:19:41.225][PowerShell ][Info ] Run script... [10:19:41.272][Moby ][Info ] Stop [10:19:41.283][HyperV ][Info ] Destroy [10:19:41.284][PowerShell ][Info ] Run script with parameters: -Destroy True -KeepVolume True... [10:19:41.289][HyperV ][Info ] Script started at 10:19:41.289 [10:19:41.300][HyperV ][Info ] Module loaded at 10:19:41.300 [10:19:41.386][HyperV ][Info ] VM MobyLinuxVM does not exist [10:19:41.389][HyperV ][Info ] Destroying Switch DockerNAT... [10:19:41.477][HyperV ][Info ] Removing VM MobyLinuxVM... [10:19:41.518][HyperV ][Debug ] [destroy] took 00:00:00.2350013 to run [10:19:41.518][Firewall ][Info ] Closing ports... [10:19:41.518][Firewall ][Info ] Removing all existing rules... [10:19:41.575][Firewall ][Info ] All existing rules are removed. [10:19:41.575][Firewall ][Info ] Ports are closed [10:19:41.575][HyperVGuids ][Info ] Removing GUIDs... [10:19:41.576][HyperVGuids ][Info ] GUIDs removed [10:19:41.576][HyperV ][Info ] Create [10:19:41.576][PowerShell ][Info ] Run script with parameters: -Create True -VhdPathOverride -SwitchSubnetAddress 10.0.75.0 -SwitchSubnetMaskSize 24 -CPUs 2 -Memory 2048 -IsoFile C:\Program Files\Docker\Docker\Resources\docker-for-win.iso... [10:19:41.580][HyperV ][Info ] Script started at 10:19:41.580 [10:19:41.592][HyperV ][Info ] Module loaded at 10:19:41.592 [10:19:41.724][HyperV ][Info ] Creating Switch: DockerNAT... [10:19:41.847][PowerMode ][Info ] Stop [10:19:41.847][HyperV ][Info ] Stop [10:19:41.847][PowerShell ][Info ] Run script with parameters: -Stop True... [10:19:41.851][HyperV ][Info ] Script started at 10:19:41.851 [10:19:41.861][HyperV ][Info ] Module loaded at 10:19:41.860 [10:19:41.907][HyperV ][Info ] VM MobyLinuxVM does not exist [10:19:41.908][HyperV ][Debug ] [stop] took 00:00:00.0610007 to run [10:19:41.908][OptimizeDisk ][Info ] Optimize [10:19:41.908][PowerShell ][Info ] Run script... [10:19:41.946][Moby ][Info ] Stop [10:19:41.950][HyperV ][Info ] Destroy [10:19:41.950][PowerShell ][Info ] Run script with parameters: -Destroy True -KeepVolume True... [10:19:41.955][HyperV ][Info ] Script started at 10:19:41.955 [10:19:41.962][HyperV ][Info ] Module loaded at 10:19:41.962 [10:19:42.002][HyperV ][Info ] VM MobyLinuxVM does not exist [10:19:42.003][HyperV ][Info ] Destroying Switch DockerNAT... [10:19:42.112][HyperV ][Info ] Removing VM MobyLinuxVM... [10:19:42.151][HyperV ][Debug ] [destroy] took 00:00:00.2010025 to run [10:19:42.151][Firewall ][Info ] Closing ports... [10:19:42.151][Firewall ][Info ] Removing all existing rules... [10:19:42.171][Firewall ][Info ] All existing rules are removed. [10:19:42.171][Firewall ][Info ] Ports are closed [10:19:42.171][HyperVGuids ][Info ] Removing GUIDs... [10:19:42.171][HyperVGuids ][Info ] GUIDs removed [10:19:42.181][NamedPipeServer][Error ] Unable to execute Start: Unable to create: L’exécution de la commande s’est arrêtée, car la variable de préférence « ErrorActionPreference » ou le paramètre courant a la valeur Stop : Hyper-V a rencontré une erreur lors d’une tentative d’accès à un objet sur l’ordinateur « DESKTOP-3MP242O », car l’objet est introuvable. L’objet a peut-être été supprimé. Vérifiez que le service de gestion d’ordinateurs virtuels est en cours d’exécution sur l’ordinateur. à New-Switch, : ligne 132 à , : ligne 409 à Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters) dans C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\HyperV.cs:ligne 181 à Docker.Backend.ContainerEngine.Linux.Start(Settings settings, String daemonOptions) dans C:\gopath\src\github.com\docker\pinata\win\src\Docker.Backend\ContainerEngine\Linux.cs:ligne 130 à Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass9_0.b__0(Object[] parameters) dans C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:ligne 47 à Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters) dans C:\gopath\src\github.com\docker\pinata\win\src\Docker.Core\pipe\NamedPipeServer.cs:ligne 145 [10:19:42.237][NamedPipeClient][Error ] Unable to send Start: Unable to create: L’exécution de la commande s’est arrêtée, car la variable de préférence « ErrorActionPreference » ou le paramètre courant a la valeur Stop : Hyper-V a rencontré une erreur lors d’une tentative d’accès à un objet sur l’ordinateur « DESKTOP-3MP242O », car l’objet est introuvable. L’objet a peut-être été supprimé. Vérifiez que le service de gestion d’ordinateurs virtuels est en cours d’exécution sur l’ordinateur. à New-Switch, : ligne 132 à , : ligne 409 [10:19:42.238][Notifications ][Error ] Unable to create: L’exécution de la commande s’est arrêtée, car la variable de préférence « ErrorActionPreference » ou le paramètre courant a la valeur Stop : Hyper-V a rencontré une erreur lors d’une tentative d’accès à un objet sur l’ordinateur « DESKTOP-3MP242O », car l’objet est introuvable. L’objet a peut-être été supprimé. Vérifiez que le service de gestion d’ordinateurs virtuels est en cours d’exécution sur l’ordinateur. à New-Switch, : ligne 132 à , : ligne 409

Steps to reproduce the behavior

  1. Install Docker on Windows 10
  2. Activates Hyper-V
  3. Start Docker
  4. Docker fails to start

Ephasme avatar Mar 04 '18 09:03 Ephasme

I think it's a problem with Hyper-V because when I run Start-VM -Name TestVM in Powershell I get that:

Ephasme avatar Mar 04 '18 09:03 Ephasme

I ran into this same issue. I had enabled Hyper-V through the Control Panel - "Turn Windows features on or off". Hyper-V Manager would launch, let me create a VM, but wouldn't start them.

I removed Hyper-V and re-enabled it through Power Shell, as Microsoft outlines here: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/quick-start/enable-hyper-v.

Now Hyper-V and Docker are working properly.

halofx avatar Mar 06 '18 13:03 halofx

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
Enable-WindowsOptionalFeature -Online -FeatureName Containers -All

jasonbivins avatar Mar 08 '18 18:03 jasonbivins

@halofx and @jasonbivins Tried both your solutions but none has proved successful. I have the same crash log as before.

Ephasme avatar Mar 11 '18 11:03 Ephasme

@Ephasme Can you open up Hyper-V manager ? Are you able to start and connect to any VM's there?

jasonbivins avatar Mar 14 '18 14:03 jasonbivins

@jasonbivins when I try to connect to the local server I get this: https://i.imgur.com/PVXmECk.png

Ephasme avatar Mar 21 '18 08:03 Ephasme

@Ephasme It looks like Hyper-V isn't getting setup correctly, even when you installed it manually. Is there anything helpful in your Windows event viewer? Docker won't run until you repair your Hyper-V installation.

jasonbivins avatar Mar 21 '18 14:03 jasonbivins

Do you have resolved your problem ? If yes, how did you do, i have the same problem.

Thanks

ninjax95 avatar May 23 '18 17:05 ninjax95

No I didn't solve my problem sorry...

Ephasme avatar May 25 '18 17:05 Ephasme

I have the same problem. Someone solve the problem ?

drou7 avatar Jun 19 '18 08:06 drou7

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Sep 17 '18 04:09 docker-robott

Same problem here, tried desinstalling Hyper-V, and enabling it back both from the Ui and the command line, everything looks normal but can start VMs on Hyper-V manager and therefore Docker also fails to start. It was working correctly (Docker) until the last update.

Chepech avatar Sep 28 '18 17:09 Chepech

Is there any way to solve? In order to open VM , i have to turn off Hyper-V But after Hyper-V being turned off, I am not able to open Docker.....

goseesomething avatar Oct 21 '18 12:10 goseesomething

Guys, who still have this issue, try the following:

  1. ensure that Virtualization technology is enabled in BIOS
  2. In Windows search, type "turn windows features on or off"
  3. If Hyper-V is enabled (box is ticked) then disable it and restart. Then enable it again and restart once more. 3a. If Hyper-V is disabled, enable it and restart.
  4. Docker now should work properly.

In my case the Hyper-V was screwed by VirtualBox so after the re-installation it now works properly. Hope this helps!

irmscher9 avatar May 05 '19 17:05 irmscher9

I have the same problem. Someone solve the problem ? @irmscher9 i tried that. still not work

qfdk avatar Jun 19 '19 08:06 qfdk

Guys, who still have this issue, try the following:

  1. ensure that Virtualization technology is enabled in BIOS
  2. In Windows search, type "turn windows features on or off"
  3. If Hyper-V is enabled (box is ticked) then disable it and restart. Then enable it again and restart once more. 3a. If Hyper-V is disabled, enable it and restart.
  4. Docker now should work properly.

In my case the Hyper-V was screwed by VirtualBox so after the re-installation it now works properly. Hope this helps!

This works for me. thanks irmscher9!

natthawatklakpetch avatar Oct 30 '19 04:10 natthawatklakpetch

I have a Hyper-V Server 2019. I have installed and configured Docker, as suggested by MS. The docker service won't start and gives me a 1067 error code when I try to start it manually. It seems to me that Docker does not work on Windows and when it works (as it happens to be the case on another machine of mine) it is by pure chance.

DumboJetEngine avatar Jan 28 '20 18:01 DumboJetEngine

The fix for me was to enable virtualisation in my bios. It'll be in Advanced > CPU Configuration > SVM - make sure it's enabled.

berengamble avatar May 05 '20 17:05 berengamble

@berengamble same fix for me. Everything working as expected.

pastime28 avatar May 11 '20 14:05 pastime28

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jun 26 '20 03:06 docker-robott