【问题标题】:unable to start minikube on windows10无法在 windows10 上启动 minikube
【发布时间】:2020-06-28 04:58:02
【问题描述】:

我正在尝试在 Windows10 Home 上安装 minikube,但出现此错误。为什么?

C:\WINDOWS\system32>minikube start --driver=hyperv
* minikube v1.11.0 on Microsoft Windows 10 Home 10.0.19041 Build 19041
* Using the hyperv driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Creating hyperv VM (CPUs=2, Memory=4000MB, Disk=20000MB) ...
panic: runtime error: index out of range [0] with length 0

goroutine 60 [running]:
github.com/docker/machine/drivers/hyperv.hypervAvailable(0xc00008cff0, 0xc0002cdd00)
        /go/pkg/mod/github.com/machine-drivers/machine@v0.7.1-0.20200323212942-41eb826190d8/drivers/hyperv/powershell.go:64 +0x105
github.com/docker/machine/drivers/hyperv.(*Driver).PreCreateCheck(0xc000439ec0, 0x0, 0x0)
        /go/pkg/mod/github.com/machine-drivers/machine@v0.7.1-0.20200323212942-41eb826190d8/drivers/hyperv/hyperv.go:171 +0x3b
k8s.io/minikube/pkg/minikube/machine.(*LocalClient).Create(0xc000043540, 0xc000439f20, 0x0, 0x0)
        /app/pkg/minikube/machine/client.go:221 +0x3f5
k8s.io/minikube/pkg/minikube/machine.timedCreateHost.func2(0x1e80ea0, 0xc000043540, 0xc000439f20, 0xc0006c0540, 0xc0004c6af0)
        /app/pkg/minikube/machine/start.go:184 +0x42
created by k8s.io/minikube/pkg/minikube/machine.timedCreateHost
        /app/pkg/minikube/machine/start.go:183 +0x10e

C:\WINDOWS\system32>minikube status
E0627 09:15:44.982608   38068 status.go:132] The "minikube" host does not exist!
minikube
type: Control Plane
host: Nonexistent
kubelet: Nonexistent
apiserver: Nonexistent
kubeconfig: Nonexistent


C:\WINDOWS\system32>

【问题讨论】:

    标签: minikube


    【解决方案1】:
    1. 检查 Hyper-V 是否已禁用。运行 PowerShell 并执行$hyperv.State -eq "Enabled" 命令
    2. 通过在 Powershell(在管理员模式下)Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All 中执行以下命令来禁用 Hyper-V(如果它正在运行)。重启你的电脑
    3. 以管理员身份运行 CMD
    4. 尝试执行minikube delete,如果尝试从 C:\Users{您的用户名} 手动删除“.minikube”文件夹失败,则尝试手动删除 '.minikube' 文件夹
    5. 尝试执行minikube start
    6. 执行minikube status命令验证它是否正在运行

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 2022-06-16
      • 2019-10-23
      • 2022-01-04
      • 2020-03-13
      • 2021-05-16
      • 1970-01-01
      • 2022-01-06
      • 2020-04-22
      • 2019-11-19
      相关资源
      最近更新 更多