minikube doesn't start with an error "vswitch not found" even though the virtual switch is available
Operating System: Windows 10 Hypervisor: Hyper-V Minikube version: v1.0.0
Available virtual switches:
PS C:\WINDOWS\system32> Get-VMSwitch
Name SwitchType NetAdapterInterfaceDescription
---- ---------- ------------------------------
DockerNAT Internal
MinikubeVS External Intel(R) Dual Band Wireless-AC 7265
Default Switch Internal
Error:
λ minikube start --vm-driver hyperv --hyperv-virtual-switch "MinikubeVS" --v 99
o minikube v1.0.0 on windows (amd64)
$ Downloading Kubernetes v1.14.0 images in the background ...
> Creating hyperv VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
@ Downloading Minikube ISO ...
142.88 MB / 142.88 MB [============================================] 100.00% 0s
Creating CA: C:\Users\sudhi\.minikube\certs\ca.pem
Creating client certificate: C:\Users\sudhi\.minikube\certs\cert.pem
[executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @(Get-Module -ListAvailable hyper-v).Name | Get-Unique
[stdout =====>] : Hyper-V
[stderr =====>] :
[executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("S-1-5-32-578")
[stdout =====>] : False
[stderr =====>] :
[executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive @([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")
[stdout =====>] : True
[stderr =====>] :
[executing ==>] : C:\windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive [Console]::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\Get-VMSwitch).Name
[stdout =====>] :
[stderr =====>] : Hyper-V\Get-VMSwitch : The operation on computer 'LAPTOP-CLH1EQAJ' failed: The specified service does not exist as an installed service.
At line:1 char:53
+ ... ::OutputEncoding = [Text.Encoding]::UTF8; (Hyper-V\Get-VMSwitch).Name
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-VMSwitch], VirtualizationException
+ FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.GetVMSwitch
! Unable to start VM: create: precreate: vswitch "MinikubeVS" not found
* Sorry that minikube crashed. If this was unexpected, we would love to hear from you:
- https://github.com/kubernetes/minikube/issues/new
Had similar situations couple of times. Especially after playing with creating/deleting/reusing hyperv-virtual-switch
.
What I can suggest you is to remove C:\Users\%USERNAME%\.minikube
and try start minikube again.
This helps in many cases.