minikube: Increase vm-driver detection timeout from 2s to 4s for hyperV
The exact command to reproduce the issue: minikube start --vm-driver=hyperv
The full output of the command that failed:
- minikube v1.7.2 on Microsoft Windows 10 Pro 10.0.17763 Build 17763
- 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:
- Suggestion: Start PowerShell as Administrator, and run: ‘Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All’
- Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/hyperv/
X hyperv does not appear to be installed
The output of the minikube logs command:
- minikube is exiting due to an error. If the above message is not useful, open an issue:
The operating system version: Windows 10 Pro
Hyper-V is installed, enabled, and works fine for docker desktop:
Output of 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 :
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 3
- Comments: 18 (2 by maintainers)
I’m running into the same issue, and my results for the Powershell command are as stated. I did measure the timing and mine is running at 2 sec and 9 ms so technically over by just a hair. PR #6422 looks like it was a recent add, can we extend the timeout to 3 or 4 sec?
Also a note that for now adding a ‘–force’ to your start command got me around it.
The “–force” worked for me. For me, the HyperV response is taking more than 5 Sec. the command “minikube start --vm-driver=hyperv --force” resolve it.
flag --force doesn’t help
@ajjensen13 If you really has hyperv configured correctly, you might have the same problem as I had
For me the problem was the hyperv driver timed out during state check (
Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online). It has a fix 2sec timeout (see #6422) and for me it need 3-4sec to return.To confirm this please run this command in powershell and copy the output here:
For example my output to this command:
So it takes 3sec to run the command for me. If you also see that more than 2sec (or close to 2sec) in
TotalSecondsyou probably has the timeout problem.