-
Notifications
You must be signed in to change notification settings - Fork 2k
Pre-create check: "Hyper-V PowerShell Module is not available" #4424
Comments
…lable Fix issue #4424 - Pre-create check: "Hyper-V PowerShell Module is not available"
I am getting the same issue on Windows Server 2016 VM. Is there a timeline for this fix to be released? Is there a workaround until then? |
Any workaround for this on windows 10? |
Same Problem. I think the solution should be
like OP suggested. The same issue exists in Minikube, btw. |
@scmikes
I strongly recommend doing this regardless of whether or not this particular bug gets fixed because of this issue that I ran into: |
Hi @pldmgg, Where can I find the file that needs to be modified? |
Line 58 in https://github.com/docker/machine/blob/master/drivers/hyperv/powershell.go (see above). |
I understood that, I can not locate the file on my machine. |
@ramit-rulz A workaround is to downgrade docker-machine to v0.13.0 |
Thanks @samirsyed |
Just wanted to verify that I was able to create new docker machine on windows 10 using downgrade to v0.13.0. Thank you very much samirsyed for posting instructions |
samirsyed - that worked for me |
Same problem here...
After the downgrade, it works fine |
+1 (@samirsyed's downgrade solution worked for me too. 14 > 13) |
Will docker-machine version 13 update in the next update of docker or will be need to do it manually like the downgrade? |
Is the status of this bug correct? It looks like a fix was submitted. At least one of the comments has a merge tag |
Not sure what's going on here. On my machine when I run from powershell Not sure how ostensibly same command yields two different results. So what's going on here? |
I would suggest to perform a @beppler @shin- |
@andrewsav-datacom, most likely your profile configuration is explicit importing the Hyper-V module using the following command. Import-Module Hyper-V The case of module name is controlled by the way you explicit import (or not import) the Hyper-V module. If you don't explicit import it (like when you execute from cmd as you use the If you explict import the Hyper-V module, powershell will report it with the same case you use on Import-Module. For example. My profile does not explicit import Hyper-V module so if i run: Import-Module hyper-V
(Get-Command hyper-v\get-vm).Module.Name Module name is reported as: |
right... but this behaviour also happens when the module is actually loaded. The Anyways, I believe solution 3 is cleaner for future use... but the current fix (c79bd4a) will do |
@gbraad try docker --debug create -d hyperv yourmachinename,then get the debug info. |
I'm able to manipulate the module name shown with |
@samirsyed Thanks,That worked for me! |
@MikyChow no need to collect this. We already know what the issue is: machine/drivers/hyperv/powershell.go Lines 57 to 69 in 1e3b6b6
It's OK for us (minikube, minishift) now. The check works... but the release as 0.14.1 or whatever was never made, so pulling docker/machine as dependency has to be done on a sha hash and this is far from ideal. Although, it would be better to make the |
+1 |
3 similar comments
+1 |
+1 |
+1 |
Guys, can you please stop +1ing? If you want to show your support, just add an reaction or w/e. This doesn't boost the speed of implementation at all. Just annoys people subscribed to the thread to see when actual updates happen. |
Any word on getting this release out? |
The time it takes is telling for the maintenance and support of this library. We have already forked this as part of docker-machines/machine, and are considering to do our own releases instead. |
Verifying for anyone also finding this via Google that downgrading from 0.14 to 0.13 resolves this issue. Practically pulled my hair out trying to get the docker machine to start. Thanks @samirsyed. |
Downgrading to 0.13 didn't worked for me, but building from master branch worked well. See CONTRIBUTING.md for more details on how to build from source. I hope docker maintainers release a new version soon. |
+1 |
1 similar comment
+1 |
I had this same issue for awhile. I installed the docker toolbox and that's all it took to work. I already met all the requirements so I am guessing there were specific versions I needed that were within the toolbox. I am all set up and running now. Hope this helps! |
|
Doesnt work. switching back to kubernetes. |
Microsoft Windows [Version 10.0.17134.48] Downgrade to 0.13 (thnx @samirsyed) helps with But now I have next problem: If I used .exe then this is simple way to change this (C:\Program Files\Docker\Docker\resources\bin\docker-machine.exe → right click and select Compatibility and check the box "Run this program as an administrator"). But how and where change this permission in WSL?.. P. S. Currently I try to use downgraded windows version of docker-machine and get this error: #2267 |
@q587p Just run your bash / shell / command line as administrator. That should fix it. WSL might already work with |
Thnx @kantenkugel! It wasn't obvious. Next one appears:
|
Have the same issue with "Hyper-V PowerShell Module is not available" error and downgrade to version 0.13 doesn't solve the problem ( with old one a have another problem). As a workaround I use Oracle VM virtualbox now. So is there any news about new docker-machine version with resolved issue :) |
https://github.com/docker/machine/releases/tag/v0.15.0 Thank you for your patience. |
I have the same issue with 0.15: Error with pre-create check: "Hyper-V PowerShell Module is not available" |
Here is the solution
|
Awesome. Thank you @webstandardcss |
To get the
I was then able to run |
Please note: this is NOT a duplicate of #4342.
Running docker-for-windows 18.03.0.16511-edge.
Command:
The issue is again with https://github.com/docker/machine/blob/master/drivers/hyperv/powershell.go with the
hypervAvailable()
function.As you can see by the debug above, trying this in PowerShell...
...gives you lowercase, i.e. 'hyper-v' and the Go code checks for uppercase 'Hyper-V'.
There are a few solutions.
BEST SOLUTION (in my opinion):
Generally, when determining if a particular PowerShell Module is installed/available, you would use the
Get-Module
cmdlet. So line 58 in https://github.com/docker/machine/blob/master/drivers/hyperv/powershell.go would go from......to...
SOLUTION 2:
Change line 58 from...
...to...
SOLUTION 3:
Make line 64...
...case insensitive.
The text was updated successfully, but these errors were encountered: