docker / for-win

Bug reports for Docker Desktop for Windows
https://www.docker.com/products/docker#/windows
1.86k stars 290 forks source link

powershell cannot find hyper-v module on Docker startup ("The specified module 'Hyper-V' was not loaded because no valid module file was found in any module directory.") #65

Closed pcarrier closed 8 years ago

pcarrier commented 8 years ago

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:

Unable to create: 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 76
   at Docker.Backend.HyperV.RunScript(String action, Dictionary`2 parameters)
   at Docker.Backend.LinuxContainersEngine.Start(Settings settings)
   at Docker.Core.Pipe.NamedPipeServer.<>c__DisplayClass7_0.<Register>b__0(Object[] parameters)
   at Docker.Core.Pipe.NamedPipeServer.RunAction(String action, Object[] parameters)

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

PS C:\Users\pcarrier> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14393.82
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.82
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
PS C:\Users\pcarrier> $PsHome
C:\Windows\System32\WindowsPowerShell\v1.0
PS C:\Users\pcarrier> ls env:
Name                           Value
----                           -----
ALLUSERSPROFILE                C:\ProgramData
APPDATA                        C:\Users\pcarrier\AppData\Roaming
CommonProgramFiles             C:\Program Files\Common Files
CommonProgramFiles(x86)        C:\Program Files (x86)\Common Files
CommonProgramW6432             C:\Program Files\Common Files
COMPUTERNAME                   PCARRIER-DELL
ComSpec                        C:\Windows\system32\cmd.exe
DEPLOY_HOSTNAME                galaxy.meteor.com
FPS_BROWSER_APP_PROFILE_STRING Internet Explorer
FPS_BROWSER_USER_PROFILE_ST... Default
GOPATH                         C:\projects\go
GOROOT                         C:\opt\go
HOMEDRIVE                      C:
HOMEPATH                       \Users\pcarrier
JAVA_HOME                      C:\Program Files\Java\jdk1.8.0_102
LANG                           en_US.UTF-8
LC_COLLATE                     C
LOCALAPPDATA                   C:\Users\pcarrier\AppData\Local
LOGONSERVER                    \\PCARRIER-DELL
METEOR_WAREHOUSE_DIR           C:\opt\meteor
MSYS                           winsymlinks:nativestrict
MSYS2_PATH_TYPE                inherit
NUMBER_OF_PROCESSORS           8
OS                             Windows_NT
Path                           C:\Program Files\Docker\Docker\Resources\bin;C:\Users\pcarrier\bin;C:\Users\pcarrier\.gem\ruby\2.3.0\bin;C:\Users\pcarrier\.npm;C:\projects\mdgscripts\bin;C:\projects\go\bin;C:\opt\go\bin;C:\opt\meteor;C:\opt\subl;C:\opt\vscode\bin;C:\opt\msys64\usr\local\bin;C:\opt\msys64\usr\bin;C:\opt\msys64\mingw64\bin;C:\opt\msys64\mingw32\bin;C:\opt\sysinternals;C:\Program Files\Docker\Docker\Resources\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Users\pcarrier\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin
PATHEXT                        .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL
PROCESSOR_ARCHITECTURE         AMD64
PROCESSOR_IDENTIFIER           Intel64 Family 6 Model 94 Stepping 3, GenuineIntel
PROCESSOR_LEVEL                6
PROCESSOR_REVISION             5e03
ProgramData                    C:\ProgramData
ProgramFiles                   C:\Program Files
ProgramFiles(x86)              C:\Program Files (x86)
ProgramW6432                   C:\Program Files
PSModulePath                   C:\Users\pcarrier\Documents\WindowsPowerShell\Modules;;C:\Program Files\WindowsPowerShell\Modules
PUBLIC                         C:\Users\Public
PYTHONIOENCODING               utf-8
SESSIONNAME                    Console
SystemDrive                    C:
SystemRoot                     C:\Windows
TEMP                           C:\Users\pcarrier\AppData\Local\Temp
TMP                            C:\Users\pcarrier\AppData\Local\Temp
USERDOMAIN                     PCARRIER-DELL
USERDOMAIN_ROAMINGPROFILE      PCARRIER-DELL
USERNAME                       pcarrier
USERPROFILE                    C:\Users\pcarrier
VISUAL                         subl -w
VS140COMNTOOLS                 C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\
windir                         C:\Windows
PS C:\Users\pcarrier> Get-Module -ListAvailable

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.0.1      Microsoft.PowerShell.Operation.V... {Get-OperationValidation, Invoke-OperationValidation}
Binary     1.0.0.1    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     3.4.0      Pester                              {Describe, Context, It, Should...}
Script     1.0.0.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}
Script     1.2        PSReadline                          {Get-PSReadlineKeyHandler, Set-PSReadlineKeyHandler, Remove-PSReadlineKeyHandler, Get-PSReadlineOption...}

    Directory: C:\windows\system32\windowspowershell\v1.0\Modules

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   1.0.0.0    AppBackgroundTask                   {Disable-AppBackgroundTaskDiagnosticLog, Enable-AppBackgroundTaskDiagnosticLog, Set-AppBackgroundTaskResourc...
Manifest   2.0.0.0    AppLocker                           {Get-AppLockerFileInformation, Get-AppLockerPolicy, New-AppLockerPolicy, Set-AppLockerPolicy...}
Manifest   1.0.0.0    AppvClient                          {Add-AppvClientConnectionGroup, Add-AppvClientPackage, Add-AppvPublishingServer, Disable-Appv...}
Manifest   2.0.0.0    Appx                                {Add-AppxPackage, Get-AppxPackage, Get-AppxPackageManifest, Remove-AppxPackage...}
Script     1.0.0.0    AssignedAccess                      {Clear-AssignedAccess, Get-AssignedAccess, Set-AssignedAccess}
Manifest   1.0.0.0    BitLocker                           {Unlock-BitLocker, Suspend-BitLocker, Resume-BitLocker, Remove-BitLockerKeyProtector...}
Manifest   2.0.0.0    BitsTransfer                        {Add-BitsFile, Complete-BitsTransfer, Get-BitsTransfer, Remove-BitsTransfer...}
Manifest   1.0.0.0    BranchCache                         {Add-BCDataCacheExtension, Clear-BCCache, Disable-BC, Disable-BCDowngrading...}
Manifest   1.0.0.0    CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSession...}
Manifest   1.0        ConfigCI                            {Get-SystemDriver, New-CIPolicyRule, New-CIPolicy, Get-CIPolicy...}
Binary     1.0.0.0    Containers                          {Add-ContainerNetworkAdapter, Add-ContainerNetworkAdapterStaticMapping, Get-ContainerNetworkAdapterStaticMap...
Manifest   1.0        Defender                            {Get-MpPreference, Set-MpPreference, Add-MpPreference, Remove-MpPreference...}
Manifest   1.0.0.0    DirectAccessClientComponents        {Disable-DAManualEntryPointSelection, Enable-DAManualEntryPointSelection, Get-DAClientExperienceConfiguratio...
Script     3.0        Dism                                {Add-AppxProvisionedPackage, Add-WindowsDriver, Add-WindowsCapability, Add-WindowsImage...}
Manifest   1.0.0.0    DnsClient                           {Resolve-DnsName, Clear-DnsClientCache, Get-DnsClient, Get-DnsClientCache...}
Manifest   1.0.0.0    EventTracingManagement              {New-EtwTraceSession, Get-EtwTraceSession, Set-EtwTraceSession, Send-EtwTraceSession...}
Manifest   1.0.0.0    HgsClient                           {Get-HgsAttestationBaselinePolicy, Get-HgsClientConfiguration, Set-HgsClientConfiguration, New-HgsGuardian...}
Manifest   1.0.0.0    HgsDiagnostics                      {New-HgsTraceTarget, Get-HgsTrace, Get-HgsTraceFileData, Test-HgsTraceTarget}
Binary     1.0.0.0    HostComputeService                  {Get-ComputeProcess, Stop-ComputeProcess}
Binary     2.0.0.0    Hyper-V                             {Add-VMAssignableDevice, Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMGpuPartitionAdapter...}
Binary     1.1        Hyper-V                             {Add-VMDvdDrive, Add-VMFibreChannelHba, Add-VMHardDiskDrive, Add-VMMigrationNetwork...}
Manifest   2.0.0.0    International                       {Get-WinDefaultInputMethodOverride, Set-WinDefaultInputMethodOverride, Get-WinHomeLocation, Set-WinHomeLocat...
Manifest   1.0.0.0    iSCSI                               {Get-IscsiTargetPortal, New-IscsiTargetPortal, Remove-IscsiTargetPortal, Update-IscsiTargetPortal...}
Script     1.0.0.0    ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest   1.0.0.0    Kds                                 {Add-KdsRootKey, Get-KdsRootKey, Test-KdsRootKey, Set-KdsConfiguration...}
Manifest   1.0.1.0    Microsoft.PowerShell.Archive        {Compress-Archive, Expand-Archive}
Manifest   3.0.0.0    Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest   3.0.0.0    Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}
Manifest   1.0.0.0    Microsoft.PowerShell.LocalAccounts  {Add-LocalGroupMember, Disable-LocalUser, Enable-LocalUser, Get-LocalGroup...}
Manifest   3.1.0.0    Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Script     1.0        Microsoft.PowerShell.ODataUtils     Export-ODataEndpointProxy
Manifest   3.0.0.0    Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest   3.1.0.0    Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest   3.0.0.0    Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSSP, Set-WSManQuickConfig...}
Manifest   1.0        MMAgent                             {Disable-MMAgent, Enable-MMAgent, Set-MMAgent, Get-MMAgent...}
Manifest   1.0.0.0    MsDtc                               {New-DtcDiagnosticTransaction, Complete-DtcDiagnosticTransaction, Join-DtcDiagnosticResourceManager, Receive...
Binary     1.0.0.0    MSMQ                                {Clear-MsmqOutgoingQueue, Clear-MsmqQueue, Enable-MsmqCertificate, Get-MsmqCertificate...}
Manifest   2.0.0.0    NetAdapter                          {Disable-NetAdapter, Disable-NetAdapterBinding, Disable-NetAdapterChecksumOffload, Disable-NetAdapterEncapsu...
Manifest   1.0.0.0    NetConnection                       {Get-NetConnectionProfile, Set-NetConnectionProfile}
Manifest   1.0.0.0    NetEventPacketCapture               {New-NetEventSession, Remove-NetEventSession, Get-NetEventSession, Set-NetEventSession...}
Manifest   2.0.0.0    NetLbfo                             {Add-NetLbfoTeamMember, Add-NetLbfoTeamNic, Get-NetLbfoTeam, Get-NetLbfoTeamMember...}
Manifest   1.0.0.0    NetNat                              {Get-NetNat, Get-NetNatExternalAddress, Get-NetNatStaticMapping, Get-NetNatSession...}
Manifest   2.0.0.0    NetQos                              {Get-NetQosPolicy, Set-NetQosPolicy, Remove-NetQosPolicy, New-NetQosPolicy}
Manifest   2.0.0.0    NetSecurity                         {Get-DAPolicyChange, New-NetIPsecAuthProposal, New-NetIPsecMainModeCryptoProposal, New-NetIPsecQuickModeCryp...
Manifest   1.0.0.0    NetSwitchTeam                       {New-NetSwitchTeam, Remove-NetSwitchTeam, Get-NetSwitchTeam, Rename-NetSwitchTeam...}
Manifest   1.0.0.0    NetTCPIP                            {Get-NetIPAddress, Get-NetIPInterface, Get-NetIPv4Protocol, Get-NetIPv6Protocol...}
Manifest   1.0.0.0    NetWNV                              {Get-NetVirtualizationProviderAddress, Get-NetVirtualizationGlobal, Get-NetVirtualizationLookupRecord, Get-N...
Manifest   1.0.0.0    NetworkConnectivityStatus           {Get-DAConnectionStatus, Get-NCSIPolicyConfiguration, Reset-NCSIPolicyConfiguration, Set-NCSIPolicyConfigura...
Manifest   1.0.0.0    NetworkSwitchManager                {Disable-NetworkSwitchEthernetPort, Enable-NetworkSwitchEthernetPort, Get-NetworkSwitchEthernetPort, Remove-...
Manifest   1.0.0.0    NetworkTransition                   {Add-NetIPHttpsCertBinding, Disable-NetDnsTransitionConfiguration, Disable-NetIPHttpsProfile, Disable-NetNat...
Manifest   1.0.0.0    PcsvDevice                          {Get-PcsvDevice, Start-PcsvDevice, Stop-PcsvDevice, Restart-PcsvDevice...}
Manifest   1.0.0.0    PKI                                 {Add-CertificateEnrollmentPolicyServer, Export-Certificate, Export-PfxCertificate, Get-CertificateAutoEnroll...
Manifest   1.0.0.0    PnpDevice                           {Get-PnpDevice, Get-PnpDeviceProperty, Enable-PnpDevice, Disable-PnpDevice}
Manifest   1.1        PrintManagement                     {Add-Printer, Add-PrinterDriver, Add-PrinterPort, Get-PrintConfiguration...}
Manifest   1.1        PSDesiredStateConfiguration         {Set-DscLocalConfigurationManager, Start-DscConfiguration, Test-DscConfiguration, Publish-DscConfiguration...}
Script     1.0.0.0    PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, Enable-PSTrace...}
Binary     1.1.0.0    PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-JobTrigger...}
Manifest   2.0.0.0    PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest   1.0.0.0    PSWorkflowUtility                   Invoke-AsWorkflow
Manifest   1.0.0.0    ScheduledTasks                      {Get-ScheduledTask, Set-ScheduledTask, Register-ScheduledTask, Unregister-ScheduledTask...}
Manifest   2.0.0.0    SecureBoot                          {Confirm-SecureBootUEFI, Set-SecureBootUEFI, Get-SecureBootUEFI, Format-SecureBootUEFI...}
Manifest   2.0.0.0    SmbShare                            {Get-SmbShare, Remove-SmbShare, Set-SmbShare, Block-SmbShareAccess...}
Manifest   2.0.0.0    SmbWitness                          {Get-SmbWitnessClient, Move-SmbWitnessClient, gsmbw, msmbw...}
Manifest   1.0.0.0    StartLayout                         {Export-StartLayout, Import-StartLayout, Get-StartApps}
Manifest   2.0.0.0    Storage                             {Add-InitiatorIdToMaskingSet, Add-PartitionAccessPath, Add-PhysicalDisk, Add-TargetPortToMaskingSet...}
Manifest   2.0.0.0    TLS                                 {New-TlsSessionTicketKey, Enable-TlsSessionTicketKey, Disable-TlsSessionTicketKey, Export-TlsSessionTicketKe...
Manifest   1.0.0.0    TroubleshootingPack                 {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
Manifest   2.0.0.0    TrustedPlatformModule               {Get-Tpm, Initialize-Tpm, Clear-Tpm, Unblock-Tpm...}
Binary     2.1.639.0  UEV                                 {Clear-UevConfiguration, Clear-UevAppxPackage, Restore-UevBackup, Set-UevTemplateProfile...}
Manifest   2.0.0.0    VpnClient                           {Add-VpnConnection, Set-VpnConnection, Remove-VpnConnection, Get-VpnConnection...}
Manifest   1.0.0.0    Wdac                                {Get-OdbcDriver, Set-OdbcDriver, Get-OdbcDsn, Add-OdbcDsn...}
Manifest   1.0.0.0    WindowsDeveloperLicense             {Get-WindowsDeveloperLicense, Unregister-WindowsDeveloperLicense, Show-WindowsDeveloperLicenseRegistration}
Script     1.0        WindowsErrorReporting               {Enable-WindowsErrorReporting, Disable-WindowsErrorReporting, Get-WindowsErrorReporting}
Manifest   1.0.0.0    WindowsSearch                       {Get-WindowsSearchSetting, Set-WindowsSearchSetting}
Manifest   1.0.0.0    WindowsUpdate                       Get-WindowsUpdateLog
pcarrier commented 8 years ago

What I did to solve this issue:

rn commented 8 years ago

@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?

pcarrier commented 8 years ago

@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.

rn commented 8 years ago

@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.

pcarrier commented 8 years ago

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.

rn commented 8 years ago

@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.

maxsu commented 8 years ago

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.

friism commented 8 years ago

@maxsu thanks for digging in to this, I've created an internal issue to track.

highsource commented 7 years ago

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.

highsource commented 7 years ago

I've checked this fix but the suggested feature was already enabled.

pcarrier commented 7 years ago

@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.

germanoeich commented 7 years ago

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

germanoeich commented 7 years ago

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.

highsource commented 7 years ago

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.

mrled commented 7 years ago

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
davtalab commented 7 years ago

I had the same issue here, was able to fix it following your report. Thanks a lot!

tizmagik commented 7 years ago

I just ran into this as well and submitted a separate diagnosis #1121 -- I will try the fixes mentioned here and post back. Thanks!

babobski commented 7 years ago

Same here:

afbeelding

Submited the crash report with dianostic id: 7738F81E-A942-4E29-A8D6-5A46E2AF0EC2/2017-09-30_11-48-12

tizmagik commented 7 years ago

What version of windows? I didn’t realize windows pro was a requirement (for Hyper-V support). Once I upgraded it worked for me

babobski commented 7 years ago

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

tizmagik commented 7 years ago

Yea, makes sense. Might also be good for the installer to realize this.

sedai77 commented 6 years ago

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

Geo-Joy commented 6 years ago

U need windows-10-pro which enables Hyper-V

babobski commented 6 years ago

@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

Geo-Joy commented 6 years ago

@babobski Okei! thanks for the update!

mcsheehan commented 6 years ago

Please please please make the installer give an error message or the crash report say that it won't run on windows home edition.

gtardif commented 6 years ago

@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.

tizmagik commented 6 years ago

Great to hear! Thanks @gtardif

maritz commented 6 years ago

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.

daoquanglap98 commented 5 years ago

@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

gigatexal commented 4 years ago

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.

OmarAlashqar commented 4 years ago

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)

docker-robott commented 4 years ago

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