gpt4 book ai didi

docker - 运行 minikube start 时 vswitch 未找到 hyperV

转载 作者:行者123 更新时间:2023-12-02 11:58:06 31 4
gpt4 key购买 nike

我创建了一个名为 "Minikube2"的虚拟交换机。以前我创建了名为“minikube”的虚拟交换机,但后来由于配置问题将其删除。

完成所有必需的配置 - “在以太网上共享..”

现在当我尝试运行时

minikube start --kubernetes-version="v1.10.3"--vm-driver="hyperv"--hyperv-virtual-switch="minikube2"

它下载 ISO ,但无法配置开关 -

它说找不到 vswitch“minikube2”

最佳答案

简短的回答是删除 C:\Users\%USERNAME%\.minikube然后再试一次。
下面是我的调查:

首先,我创建了虚拟交换机“minikube”,启动了集群并按预期工作。
然后我停止了 minikube,创建了新的“Minikube2”开关并启动了 minikube

minikube start --kubernetes-version="v1.10.3" --vm-driver="hyperv" --hyperv-virtual-switch="minikube2" --v=9

出现的问题:

Starting local Kubernetes v1.10.3 cluster... Starting VM... [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive ( Hyper-V\Get-VM minikube ).state [stdout =====>] : Off

[stderr =====>] : [executing ==>] : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NonInteractive Hyper-V\Start-VM minikube [stdout =====>] : [stderr =====>] : Hyper-V\Start-VM : 'minikube' failed to start. Synthetic Ethernet Port (Instance ID AF9D08DC-2625-4F24-93E5-E09BAD904899): Error 'Insufficient system resources exist to complete the requested service.'. Failed to allocate resources while connecting to a virtual network. The Ethernet switch may not exist. 'minikube' failed to start. (Virtual machine ID 863D6558-78EC-4648-B712-C1FDFC907588) 'minikube' Synthetic Ethernet Port: Failed to finish reserving resources with Error 'Insufficient system resources exist to complete the requested service.' (0x800705AA). (Virtual machine ID 863D6558-78EC-4648-B712-C1FDFC907588) 'minikube' failed to allocate resources while connecting to a virtual network: Insufficient system resources exist to complete the requested service. (0x800705AA) (Virtual Machine ID 863D6558-78EC-4648-B712-C1FDFC907588). The Ethernet switch may not exist. Could not find Ethernet switch 'minikube'. At line:1 char:1 + Hyper-V\Start-VM minikube + ~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Start-VM], VirtualizationException + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.StartVM

E1022 12:50:43.384867 6216 start.go:168] Error starting host: Error starting stopped host: exit status 1.

Retrying. E1022 12:50:43.398832 6216 start.go:174] Error starting host: Error starting stopped host: exit status 1 PS C:\Windows\system32>



然后我删除了 C:\Users\%USERNAME%\.minikube , minikube vm 在 Hyper-V 中重新启动:
C:\Windows\system32> minikube start --kubernetes-version="v1.10.3" --vm-driver="hyperv" --hyperv-virtual-switch="minikube2" --v=9

结果:

Starting local Kubernetes v1.10.3 cluster... Starting VM...

Downloading Minikube ISO

170.78 MB / 170.78 MB [============================================] 100.00% 0s Creating CA: C:\Users\Vitalii.minikube\certs\ca.pem

Creating client certificate: C:\Users\Vitalii.minikube\certs\cert.pem

----- [stderr =====>] : Using switch "Minikube2"

----- Moving files into cluster...

Downloading kubeadm v1.10.3

Downloading kubelet v1.10.3 Finished

Downloading kubeadm v1.10.3 Finished

Finished Downloading kubelet v1.10.3

Setting up certs... Connecting to

cluster... Setting up kubeconfig...

Starting cluster components...

Kubectl is now configured to use the cluster.


PS C:\Windows\system32> kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-c4cffd6dc-cjzsm 1/1 Running 0 1m
kube-system etcd-minikube 1/1 Running 0 56s
kube-system kube-addon-manager-minikube 1/1 Running 0 13s
kube-system kube-apiserver-minikube 1/1 Running 0 41s
kube-system kube-controller-manager-minikube 1/1 Running 0 1m
kube-system kube-dns-86f4d74b45-w62rv 2/3 Running 0 1m
kube-system kube-proxy-psgss 1/1 Running 0 1m
kube-system kube-scheduler-minikube 1/1 Running 0 21s
kube-system kubernetes-dashboard-6f4cfc5d87-jz266 1/1 Running 0 1m
kube-system storage-provisioner 1/1 Running 0 1m

关于docker - 运行 minikube start 时 vswitch 未找到 hyperV,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52904393/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com