Reputation: 21865
I've created a Switch in Hyper-V Manager
:
Virtual Switch Manager (on the right) => New Virtual Network Switch => External => MinikubeSwitch
And then :
After hitting in CLI (under Administrator in Windows 10) the line :
minikube start --driver=hyperv --hyperv-virtual-switch=MinikubeSwitch
I got :
PS C:\bin> minikube start --driver=hyperv --hyperv-virtual-switch=MinikubeSwitch
* minikube v1.9.2 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
* Using the hyperv driver based on user configuration
* Starting control plane node m01 in cluster minikube
* Creating hyperv VM (CPUs=2, Memory=2200MB, Disk=20000MB) ... ! StartHost failed, but will try again: creating host: create host timed out in 120.000000 seconds
* Stopping "minikube" in hyperv ...
* Powering off "minikube" via SSH ...
* Deleting "minikube" in hyperv ...
E0421 12:59:59.746863 2736 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:00:01.624914 2736 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:00:03.443467 2736 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
* Creating hyperv VM (CPUs=2, Memory=2200MB, Disk=20000MB) ...
E0421 13:00:05.635939 2736 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:00:07.748572 2736 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:00:09.940572 2736 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:00:11.850044 2736 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:00:13.887769 2736 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:00:16.088700 2736 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
PS C:\bin> Get-Vm
Name State CPUUsage(%) MemoryAssigned(M) Uptime Status Version
---- ----- ----------- ----------------- ------ ------ -------
DockerDesktopVM Running 0 2048 02:16:40.4550000 Operating normally 9.0
PS C:\bin>
However it keeps failing , even though I've tried to delete the old minikube and reinstall it.
Any idea how to fix it ?
Upvotes: 5
Views: 16229
Reputation: 37
Please run below commands in command prompt in admin mode.
minikube delete --all --purge
minikube start
Upvotes: 3
Reputation: 95
I had same problem with mac, found that docker was not running. I started the docker desktop and then deleted minikube and installed again.
minikube delete
minikube start
minikube dashboard
Upvotes: 0
Reputation: 1649
In case you couldn't manage to fix the issue you can follow the minikube docs for HyperV driver.
This is valid only for Windows10 Pro users.
You can verify that it says:
--hyperv-virtual-switch: ... Defaults to first found
And as I could see in the screenshots you already have a Default switch so there is no need to create a new one you will only need to run make sure to run as admin
:
minikube start --driver=hyperv
In case you had some issue you can try to delete with purge flag the minikube VM then restart it:
minikube delete --all --purge
else you could troubleshoot running:
minikube start --alsologtostderr -v=7
Upvotes: 0
Reputation: 31
I had the same problem on a freshly installed Windows 10. Before starting minikube, docker must be installed (if docker is going to be used as driver), hence I had to delete minikube, and then re-install it.
This way minikube automatically found docker and used docker as the driver
Automatically selected the docker driver. Other choices: hyperv, ssh
.
to delete minikube:
minikube delete
and then again
minikube start
Upvotes: 0
Reputation: 21865
OK , found the problem , I put it below for other people whom might encounter the same problem :
Replace the CLI command
minikube start --driver=hyperv --hyperv-virtual-switch=MinikubeSwitch
with :
minikube start --driver=hyperv MinikubeSwitch
The param --hyperv-virtual-switch
is not relevant anymore.
Upvotes: 4