Closed pcarrier closed 8 years ago
What I did to solve this issue:
PSModulePath
and set it to C:\Program Files\WindowsPowerShell\Modules;c:\windows\system32\windowspowershell\v1.0\Modules
(taken from a fresh Windows PowerShell window with echo $env:PSModulePath
).@pcarrier Thanks for your report and the update. Your last update seems to suggest that you were abel to fix this and you closed the issue, but then re-opened it.
Is this still an issue?
@rneugeba not to me, but anybody could run into this, arguably Docker for Windows can be "blamed" for not initializing the PowerShell module path the way the Windows PowerShell launcher does (no idea how), and it's not trivial to troubleshoot unless you happen to know more about PowerShell than I did myself.
@pcarrier thanks for the reply. I think this is is first time we have seen this issue. I'll be closing it for now. We added some additional logging to the diagnose which should help us catch this issue should others have it too. Thanks again for reporting and following up.
Fair enough. I'll point out that PowerShell started from the start menu knows how to initialize PSModulePath when it's not set in the system environment variables, it'd be great if Docker had the same ability.
@dgageot have you seen this before, ie the module load path not being in the environment? We do explicitly load the module but assume the path is set.
I'd like to confirm another sighting of this issue in the wild. Exact same message as pcarrier, however the environment variable was properly set.
The fix I found was to enable the Hyper-V > Hyper-V Management Tools >Hyper-V Module for Windows PowerShell feature in Windows Features. I had previously enabled Hyper-V by itself.
I could be wrong, but I suspect that Docker for Windows checks for Hyper-V but not the Powershell module.
The fix is documented here, suggesting that at least one other person had the issue.
The reason I share this is that this is an unexpected extra step. As per the Install Docs point out that the
The Hyper-V package must be enabled. The Docker for Windows installer will enable it for you, if needed. (This requires a reboot).
I think this belongs here, as the resulting symptom is identical to pcarrier's (a google search of the error message brought me here), and there are no other issues that mention the Hyper-V Module. Until the issue is resolved people can find the fix here.
Lemme know if this should be a separate issues, but I move to reopen this one.
@maxsu thanks for digging in to this, I've created an internal issue to track.
I'm running into this right now:
Unable to stop: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The specified module 'Hyper-V' was not loaded because no valid module file was found in any module directory.
at <ScriptBlock>, <No file>: line 79
at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters)
at Docker.Backend.ContainerEngine.Linux.DoStop()
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)
(Crash report id F2A3BD75-FCA0-429E-BD32-B2E488D8067D/2017-02-19_21-28-45
.)
I've enabled Hyper-V during Docker installation.
I've checked this fix but the suggested feature was already enabled.
@maxsu your issue was already covered implicitly by my initial message:
[...] after enabling all Hyper-V-related Windows features, including "Hyper-V Module for Windows PowerShell".
@highsource did you try to follow the instructions from https://github.com/docker/for-win/issues/65#issuecomment-243458778 ?
I unsubscribe from this issue, please @pcarrier if I can help further.
I'm running into the same issue as @highsource. Simply running docker makes the crash happen, not using PowerShell or anything. If I can solve it i'll get back to this thread, meanwhile if anyone can help, it would be much appreciated.
Unable to stop: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The specified module 'Hyper-V' was not loaded because no valid module file was found in any module directory.
at <ScriptBlock>, <No file>: line 79
at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters)
at Docker.Backend.ContainerEngine.Linux.DoStop()
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)
Crash ID: 327532F6-2243-410F-96C2-DB44AABB3C8B/2017-03-21_14-03-36
I had Hyper-V disabled when I installed Docker. After enabling it, the error on the last post happened. I just had to re-install docker for it to work. I don't know what caused it and when rebooting my windows was updated, so I'm basically clueless about what solved the issue.
I finally dropped efforts to install Docker with this installer. The installation kept complaining about virtualization. I had to check bios settings (everything was enabled). I tried uninstalling and installing again Hyper-V stuff via Windows components. Finally I got it into the state when Hyper-V could no longer be enabled because my CPU does not support it. But I'm sure it this component was installed and enabled previously.
I'm seeing this issue as well.
I've made sure that C:\Program Files\WindowsPowerShell\Modules
and c:\windows\system32\windowspowershell\v1.0\Modules
are in my system path, and I've restarted the docker service (and, in fact, the entire machine) before retrying the update.
I've also made sure that the Powershell module is installed - I can do Import-Module Hyper-V
in my own Powershell sessions. I've also rebooted since ensuring that this module is installed..
However, despite that, I'm still seeing a hanging Docker updater, and logs at $env:LOCALAPPDATA\docker\install-log.txt
that look like this:
Version: 17.03.1-ce-win4 (10721)
Channel: stable
Sha1: f7a7acb1e07211851a46a58bb439c8c749f8e0e7
Started on: 2017/03/29 10:26:46.302
Resources: C:\Program Files\Docker\Docker\Resources
OS: Windows 10 Pro
Edition: Professional
Id: 1607
Build: 14393
BuildLabName: 14393.953.amd64fre.rs1_release_inmarket.170303-1614
File: C:\Users\mledbetter\AppData\Local\Docker\install-log.txt
CommandLine: "C:\Program Files\Docker\Docker\InstallerCli.exe" -k -p
You can send feedback, including this log file, at https://github.com/docker/for-win/issues
[10:26:46.459][Installer ][Info ] Killing processes...
[10:26:46.474][Installer ][Info ] Killing existing com.docker.service process with PID 3776
[10:26:46.709][Installer ][Info ] Preparing upgrade...
[10:26:46.709][HyperV ][Info ] Destroy
[10:26:46.724][PowerShell ][Info ] Run script with parameters: -Destroy True -KeepVolume True...
[10:26:46.724][PowerShell ][Info ] Creating a Runspace Pool...
[10:26:46.849][PowerShell ][Info ] Runspace Pool created (Min=1, Max=2)
[10:26:46.959][HyperV ][Info ] Script started at 10:26:46.943
[10:26:46.974][Installer ][Error ] Unable to destroy: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The specified module 'Hyper-V' was not loaded because no valid module file was found in any module directory.
at <ScriptBlock>, <No file>: line 79
I had the same issue here, was able to fix it following your report. Thanks a lot!
I just ran into this as well and submitted a separate diagnosis #1121 -- I will try the fixes mentioned here and post back. Thanks!
Same here:
Submited the crash report with dianostic id: 7738F81E-A942-4E29-A8D6-5A46E2AF0EC2/2017-09-30_11-48-12
What version of windows? I didn’t realize windows pro was a requirement (for Hyper-V support). Once I upgraded it worked for me
Windows 10 home edition. If you look at the documentation for the instal of hyper-v on Windows 10. The requirements are:
They also note:
The Hyper-V role cannot be installed on Windows 10 Home
Yea, makes sense. Might also be good for the installer to realize this.
Seeing exact same issue on a brand new windows 10 laptop. sent crash report with D77AE871-09FC-40DC-B9FC-8AA3531B9D3A/2017-11-06_19-40-52
U need windows-10-pro which enables Hyper-V
@Geo-Joy I need to correct you, it only does not work on the Windows 10 home edition. The requirements for Hyper-V are:
- Windows 10 Enterprise, Professional, or Education
The only alternative you have on Windows 10 Home edition, is to use the Legacy Docker Toolbox
@babobski Okei! thanks for the update!
Please please please make the installer give an error message or the crash report say that it won't run on windows home edition.
@mcsheehan Thx for the feedback ; checks for the Home edition and MS variants have been improved in the 17.11 edge release already available. This will also get in the next stable release.
Great to hear! Thanks @gtardif
Purely informative for anyone googling this in the future.
Faced a similar issue, Hyper-V didn't get properly installed after the prompt or something. I disabled the Hyper-V feature again, rebooted, enabled it again, rebooted and was greeted by a black screen during boot and after a couple of reboots a Bluescreen, apparently caused by the ESEA client. (a piece of awful software I didn't even know I still had installed) I rebooted into safe mode, uninstalled ESEA and then everything worked fine.
So it seems like my System got broken by some interaction between ESEA client and Hyper-V feature install.
@highsource
I'm running into this right now:
Unable to stop: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: The specified module 'Hyper-V' was not loaded because no valid module file was found in any module directory. at <ScriptBlock>, <No file>: line 79 at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters) at Docker.Backend.ContainerEngine.Linux.DoStop() 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)
(Crash report id
F2A3BD75-FCA0-429E-BD32-B2E488D8067D/2017-02-19_21-28-45
.)I've enabled Hyper-V during Docker installation.
have you fixed this error? can you help me
FWIW I was seeing this on a fresh, up-to-date windows 10 professional install with the latest Docker for Windows stable installer. For whatever reason the installer doesn't add this to the PowerShell path: c:\windows\system32\windowspowershell\v1.0\Modules
or when Windows sets up the the HyperV powershell components either way adding that to the PSModulePath
that @pcarrier suggested worked.
Leaving this here as it fixed the issue for me.
I had enabled Hyper-V and Containers through the Windows GUI, but disabling them and re-enabling them through Powershell worked (follow this)
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
Expected behavior
Docker starts happily on Windows 10 after enabling all Hyper-V-related Windows features, including "Hyper-V Module for Windows PowerShell".
Actual behavior
On startup, "An error occured" window pops up with the following output:
The whale stays red.
Turning the Hyper-V and PowerShell-related Windows features off, rebooting, turning them back on, rebooting, etc. doesn't help.
Information