Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Kubernetes 无法使用Hyper-V在Windows 10上启动minikube_Kubernetes_Hyper V_Minikube - Fatal编程技术网

Kubernetes 无法使用Hyper-V在Windows 10上启动minikube

Kubernetes 无法使用Hyper-V在Windows 10上启动minikube,kubernetes,hyper-v,minikube,Kubernetes,Hyper V,Minikube,即使虚拟交换机可用,minikube也不会以错误“vswitch not found”开始 操作系统:Windows 10 虚拟机监控程序:Hyper-V Minikube版本:v1.0.0 可用虚拟交换机: PS C:\WINDOWS\system32> Get-VMSwitch Name SwitchType NetAdapterInterfaceDescription ---- ---------- ---------------------

即使虚拟交换机可用,minikube也不会以错误“vswitch not found”开始

操作系统:Windows 10 虚拟机监控程序:Hyper-V Minikube版本:v1.0.0

可用虚拟交换机:

PS C:\WINDOWS\system32> Get-VMSwitch

Name           SwitchType NetAdapterInterfaceDescription
----           ---------- ------------------------------
DockerNAT      Internal
MinikubeVS     External   Intel(R) Dual Band Wireless-AC 7265
Default Switch Internal
λ 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
错误:

PS C:\WINDOWS\system32> Get-VMSwitch

Name           SwitchType NetAdapterInterfaceDescription
----           ---------- ------------------------------
DockerNAT      Internal
MinikubeVS     External   Intel(R) Dual Band Wireless-AC 7265
Default Switch Internal
λ 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

有过几次类似的情况。尤其是在玩过创建/删除/重用
hyperv虚拟交换机之后

我建议您删除
C:\Users\%USERNAME%\.minikube
,然后再次尝试启动minikube

这在很多情况下都有帮助