Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hyperv: powershell Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed #6640

Closed
ghost opened this issue Feb 14, 2020 · 17 comments
Labels
co/hyperv HyperV related issues kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@ghost
Copy link

ghost commented Feb 14, 2020

image
HiperV installed, works fine with Docker desktop, also installed GCloud with kubectl (works fine too).

I tried to start with virual-switch :
minikube start --vm-driver hyperv --hyperv-virtual-switch "minikube"
with flag --force
Result the same.
Can someone explain what I do wrong?

@ghost ghost changed the title Unable to start on wondows 10 pro Unable to start on windows 10 pro Feb 14, 2020
@ghost ghost changed the title Unable to start on windows 10 pro Unable to start on windows 10 pro (problem with hyperv) Feb 14, 2020
@detroyejr
Copy link

Launch your shell as an admin. Then try again.

@ghost
Copy link
Author

ghost commented Feb 14, 2020

Launch your shell as an admin. Then try again.

I did, I always use shell from admin.

@detroyejr
Copy link

Got it. Can you provide more info? What's the output of minikube start --alsologtostderr -v=7?

@ghost
Copy link
Author

ghost commented Feb 14, 2020

@detroyejr sure, thanks for helping.
image

@detroyejr
Copy link

detroyejr commented Feb 14, 2020

Wouldn't know offhand why it can't find hyperv unless it's really just not installed. Can you double check that you have everything Enabled? What's the output of Get-WindowsOptionalFeature -Online | Format-Table? Is it showing everything HyperV related enabled?

@ghost
Copy link
Author

ghost commented Feb 14, 2020

@detroyejr I did everything from the official tutorial.
image

@detroyejr
Copy link

Yeah, really not sure how to help assuming you're running as admin and HyperV is setup the normal way.

Just as a sanity check, make sure you're really running admin.

Begin {
    #Checks if the user is in the administrator group. Warns and stops if the user is not.
    if (-NOT ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) {
        Write-Warning "You are not running this as local administrator. Run it again in an elevated prompt." ; break
    }
}

You could also try deleting the .minikube folder in your user directory and seeing if that helps.

@ghost
Copy link
Author

ghost commented Feb 14, 2020

image
I deleted .minikube folder with all subfolders - result the same :(

@detroyejr
Copy link

detroyejr commented Feb 14, 2020

What version of minikube are you using? Latest version? Does the same problem exist in in 1.6.2?

@KhangLe96
Copy link

I have the same problem with the latest version 1.7.2

@ghost
Copy link
Author

ghost commented Feb 15, 2020

What version of minikube are you using? Latest version? Does the same problem exist in in 1.6.2?

Yes, I used the latest version. I will try to reinstal prev version to check

@KhangLe96
Copy link

Adding --force to the command has solved the problem for me

@tstromberg tstromberg changed the title Unable to start on windows 10 pro (problem with hyperv) hyperv: powershell.exe Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed Feb 19, 2020
@tstromberg tstromberg added the co/hyperv HyperV related issues label Feb 19, 2020
@tstromberg tstromberg changed the title hyperv: powershell.exe Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed hyperv: powershell Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed Feb 19, 2020
@tstromberg
Copy link
Contributor

Can you include the output of:

minikube start --alsologtostderr -v=8

docker/for-win#1631 hinted to me that -- maybe it's possible that it's related to the Containers feature being enabled? Maybe that's a red herring though.

The hyperv driver mentioned comes from https://github.com/machine-drivers/machine -- so whatever fix is involved will likely have to happen there.
While the bug does sound vaguely permissions oriented, I'm not sure what to make of it.

@tstromberg tstromberg added triage/needs-information Indicates an issue needs more information in order to work on it. kind/support Categorizes issue or PR as a support question. labels Feb 26, 2020
@jbcripe68
Copy link

jbcripe68 commented Feb 27, 2020

I am having the same problem with v1.7.3. When I do a systemInfo I get two Hyper-V network cards:

PS C:\WINDOWS\system32> systeminfo

Host Name: DESKTOP-C1H04CG
OS Name: Microsoft Windows 10 Enterprise
...
Network Card(s): 5 NIC(s) Installed.
[01]: Zscaler Network Adapter 1.0.2.0
Connection Name: Ethernet 2
Status: Media disconnected
[02]: Intel(R) Ethernet Connection (2) I219-LM
Connection Name: Ethernet
DHCP Enabled: Yes
DHCP Server: 172.19.217.4
IP address(es)
[01]: 10.114.57.81
[02]: fe80::6911:6481:774e:f71f
[03]: Intel(R) Dual Band Wireless-AC 8260
Connection Name: Wi-Fi
Status: Hardware not present
[04]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (Default Switch)
DHCP Enabled: No
IP address(es)
[01]: 172.17.172.193
[02]: fe80::652a:c05e:3e43:1917
[05]: Hyper-V Virtual Ethernet Adapter
Connection Name: vEthernet (nat)
DHCP Enabled: No
IP address(es)
[01]: 172.19.176.1
[02]: fe80::31f9:a0d1:c117:8e47
Hyper-V Requirements: A hypervisor has been detected. Features required for Hyper-V will not be displayed.

Could this be the problem???

@jbcripe68
Copy link

I also notice if I run the failing command it works:

PS C:\WINDOWS\system32> minikube start --vm-driver hyperv
! minikube v1.7.3 on Microsoft Windows 10 Enterprise 10.0.18362 Build 18362

  • Using the hyperv driver based on user configuration

! 'hyperv' driver reported an issue: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed:

X hyperv does not appear to be installed
PS C:\WINDOWS\system32> Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online

FeatureName : Microsoft-Hyper-V-All
DisplayName : Hyper-V
Description : Provides services and management tools for creating and running virtual machines and their
resources.
RestartRequired : Possible
State : Enabled
CustomProperties :

@Tallyrald
Copy link

This happened to me right after I installed the latest Windows update packages (KB4535996 & KB4537572 & KB4052623). Same error messages, same everything as OP on minikube v1.7.3. Before the update, everything worked fine. Current Windows build number is Microsoft Windows 10 Pro Build 18363.
Is it possible that Microsoft changed how the HyperV driver reports back it's status and minikube's validation simply cannot read it properly?

Using the --force flag solved the problem for me too.

@sharifelgamal
Copy link
Collaborator

This should be fixed in the latest version of minikube, starting with 1.8. I'll go ahead and close this, feel free to reopen if it continues to be a problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/hyperv HyperV related issues kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

6 participants