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: create host timed out in 120.000000 seconds #7825

Closed
shikha0208 opened this issue Apr 21, 2020 · 7 comments
Closed

hyperv: create host timed out in 120.000000 seconds #7825

shikha0208 opened this issue Apr 21, 2020 · 7 comments
Labels
co/hyperv HyperV related issues kind/support Categorizes issue or PR as a support question. needs-solution-message Issues where where offering a solution for an error would be helpful

Comments

@shikha0208
Copy link

Steps to reproduce:
PS C:\kube> minikube start --kubernetes-version="v1.18.0" --vm-driver="hyperv" --hyperv-virtual-switch="Mini
ube" * minikube v1.9.2 auf Microsoft Windows 10 Enterprise 10.0.18363 Build 18363

  • Creating hyperv VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
    ! StartHost failed, but will try again: creating host: create host timed out in 120.000000 seconds
  • Stopping "minikube" in hyperv ...
  • minikube" wird über SSH ausgeschaltet...
  • minikube" in hyperv wird gelöscht...
    E0421 13:06:28.578777 4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".
    At line:1 char:3
  • ( Hyper-V\Get-VM minikube ).state

icrosoft.HyperV.PowerShell.Commands.GetVM E0421 13:06:30.6 4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V wa [ooooooooooooooooooooooooooooooooooooooooo to find a virtual machine with name "minikube".
At line:1 char:3

  • ( Hyper-V\Get-VM minikube ).state
  • + CategoryInfo          : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
                                                                                                                                                                                                                                                * Creating hyperv VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...                                                          E0421 13:06:32.756783    4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".                                                                                    At line:1 char:3
    
  • ( Hyper-V\Get-VM minikube ).state

At line:1 char:3

  • ( Hyper-V\Get-VM minikube ).state
  • + CategoryInfo          : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
    
    
    

E0421 13:06:37.357536 4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".
At line:1 char:3

  • ( Hyper-V\Get-VM minikube ).state
  • + CategoryInfo          : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
    
    
    

E0421 13:06:39.545037 4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".
At line:1 char:3

  • ( Hyper-V\Get-VM minikube ).state
  • + CategoryInfo          : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
    
    
    

E0421 13:06:41.696377 4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".
At line:1 char:3

  • ( Hyper-V\Get-VM minikube ).state
  • + CategoryInfo          : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
    
    
    

E0421 13:06:43.905041 4372 main.go:106] libmachine: [stderr =====>] : Hyper-V\Get-VM : Hyper-V was unable to find a virtual machine with name "minikube".
At line:1 char:3

  • ( Hyper-V\Get-VM minikube ).state
  • + CategoryInfo          : InvalidArgument: (minikube:String) [Get-VM], VirtualizationException
    + FullyQualifiedErrorId : InvalidParameter,Microsoft.HyperV.PowerShell.Commands.GetVM
    
    
    
@shikha0208
Copy link
Author

Could anyone help on this issue?I have tried all the ways by uninstalling and doing it again.
But this issue appears everytime and there is no conflicting vpn connections.

@tstromberg tstromberg changed the title Minikube start doesnot work on windows 10 , even when vpn is not connected hyperv: create host timed out in 120.000000 seconds Apr 21, 2020
@tstromberg tstromberg added the co/hyperv HyperV related issues label Apr 21, 2020
@tstromberg
Copy link
Contributor

tstromberg commented Apr 21, 2020

@shikha0208 - does it work if you omit the --hyperv-virtual-switch flag?

I ask, because it might be that the virtual switch specified does not have a valid configuration.

@tstromberg tstromberg added needs-solution-message Issues where where offering a solution for an error would be helpful kind/support Categorizes issue or PR as a support question. labels Apr 21, 2020
@AlivedDe
Copy link

AlivedDe commented Apr 22, 2020

I have the same issue starting minikube with the same output as a topic starter.

What changed between previously successfully running minikube VM and failed start

  1. I set MINIKUBE_HOME to point to a different drive.
  2. I set default location for HyperV VMs to a different drive

Exact command to run:
minikube start --driver=hyperv --hyperv-virtual-switch=Internal --force

(Internal is a custom HyperV virtual switch with Internal setup).

Tried solutions:

  1. Starting minikube with --driver=docker also fails.
  2. Starting minikube with --force flag does not help.
  3. All VPN programs removed.
  4. Use Virtual-switch with External configuration does not help.
  5. Using default minikube home location does not help.
  6. minikube delete --all=true does not help.
  7. minikube delete --all=true --purge=true does not help.
  8. re-intall minikube does not help.
  9. Turn off Windows Firewall did not help.

Docker Desktop Kubernetes works well when I start it. (tried after failures with minikube).

However, Docker is used with Windows containers. Only for trying K8s I switched to Linux container and then back to Windows.

All work is done using PowerShell with Admin mode.

minikube version: v1.9.2
commit: 93af9c1

@AlivedDe
Copy link

Installing minikube 1.8.2 did not help. Is there anything what could stay behind if minikube unexpectedly turned off? What files I may check or delete?

PS C:\WINDOWS\system32> minikube start --driver=hyperv --hyperv-virtual-switch=Internal --force

! minikube v1.8.2 on Microsoft Windows 10 Pro 10.0.18362 Build 18362

  • MINIKUBE_HOME=E:\Kube.minikube
  • Using the hyperv driver based on user configuration
  • Downloading VM boot image ...

    minikube-v1.8.0.iso.sha256: 65 B / 65 B [--------------] 100.00% ? p/s 0s
    minikube-v1.8.0.iso: 173.56 MiB / 173.56 MiB [ 100.00% 1.59 MiB p/s 1m50s

  • Downloading preloaded images tarball for k8s v1.17.3 ...

    preloaded-images-k8s-v1-v1.17.3-docker-overlay2.tar.lz4: 499.26 MiB / 499

  • Creating hyperv VM (CPUs=2, Memory=3500MB, Disk=20000MB) ...

X Unable to start VM. Please investigate and run 'minikube delete' if possible: creating host: create host timed out in 120.000000 seconds
*

@AlivedDe
Copy link

After intallation failure

PS C:\WINDOWS\system32> minikube status
E0422 15:32:55.537184 16836 status.go:190] failed to get driver ip: getting IP: IP not found
E0422 15:32:55.541184 16836 status.go:114] status error: getting IP: IP not found
m01
host: Error
kubelet: Nonexistent
apiserver: Nonexistent
kubeconfig: Nonexistent

@AlivedDe
Copy link

AlivedDe commented Apr 22, 2020

minikube start (w/o flags) helped (before was not helping)

However, then I did:

  1. minikube stop
  2. turned on dynamic memory on VM
  3. assinged a different virtual switch (has the same settings as Default switch)
  4. minikube start

Process hangs on

  • Restarting existing hyperv VM for "minikube" ...

After I get back to default switch, minikube start succeeds.

Could you please tell why a switch with the same configuration as Default Switch in HyperV does not suite minikube?

Ok, after running
minikube start --hyperv-virtual-switch="Internal Switch"

It worked. So, solution in my case was:

  1. minikube delete --all --purge
  2. remove all VPN software
  3. re-install minikube 1.9.2 -> 1.8.2 -> 1.9.2
  4. minikube start
  5. minikube stop
  6. set dynamic memory for VM
  7. minikube start

Looks liek everything works now. Just 3 days of trying to get it up :)

However, hyperv shows that minikube VM runs on Default Switch and it is not possible to use a different internal switch

@shikha0208
Copy link
Author

It is working fine.I am closing this issue

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. needs-solution-message Issues where where offering a solution for an error would be helpful
Projects
None yet
Development

No branches or pull requests

3 participants