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

4

虚拟交换机可用,但minikube出现“未找到vswitch”错误无法启动

操作系统: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
1个回答

2

曾经遇到过类似的情况,特别是在创建/删除/重用hyperv-virtual-switch之后。

我建议您删除C:\Users\%USERNAME%\.minikube并尝试重新启动minikube。

这在许多情况下都有帮助。

最初的回答:


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接