简体   繁体   English

如何使用 minikube start 修复 VM 问题?

[英]How to fix VM issue with minikube start ?

I am a beginner to Kubernetes and starting off with this tutorial.我是 Kubernetes 的初学者,从教程开始。 I installed VM and expected to be able to start a cluster by using the command:我安装了VM并希望能够使用以下命令启动集群:

minikube start

But I get the error:但我收到错误:

Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E0911 13:34:45.394430   41676 start.go:174] Error starting host: Error 
creating host: Error executing step: Creating VM.
: Error setting up host only network on machine start: The host-only 
adapter we just created is not visible. This is a well known 
VirtualBox bug. You might want to uninstall it and reinstall at least 
version 5.0.12 that is is supposed to fix this issue.

It says that it is a well known bug in Virtualbox but I installed its latest version.它说这是 Virtualbox 中的一个众所周知的错误,但我安装了它的最新版本。 Any ideas?有任何想法吗?

Figured out the issue. 找出问题所在。 VirtualBox was not installed correctly as Mac had blocked it. 由于Mac阻止了VirtualBox,因此未正确安装VirtualBox。 It wasn't obvious at first. 起初并不明显。

  • Restarting won't work if VirtualBox isn't installed correctly. 如果未正确安装VirtualBox,则无法重新启动。

  • System Preferences -> Security & Privacy -> Allow -> Then allow the software corporation (in this case Oracle) 系统首选项 - >安全和隐私 - >允许 - >然后允许软件公司(在本例中为Oracle)

  • Restart 重新开始

Now it worked as expected. 现在它按预期工作了。

Have you tried restarting your computer after installing the VirtualBox ? 您是否尝试在安装VirtualBox后重新启动计算机? (seems to be also a known bug to docker-machine which is used by minikube to initialize you local env) (似乎也是docker -machine的一个已知错误,minikube使用它来初始化你的本地环境)

This definitely worked for me, starting minikube by specifying vm-driver and kubernetes-version这绝对对我有用,通过指定 vm-driver 和 kubernetes-version 启动 minikube

minikube start --vm-driver=hyperkit --kubernetes-version v1.16.0 minikube start --vm-driver=hyperkit --kubernetes-version v1.16.0

Sorry not writing the solution, but i found a good link through which you can get the issue resolved 抱歉没有编写解决方案,但我找到了一个很好的链接,通过它可以解决问题

https://medium.com/@DMeechan/fixing-the-installation-failed-virtualbox-error-on-mac-high-sierra-7c421362b5b5 https://medium.com/@DMeechan/fixing-the-installation-failed-virtualbox-error-on-mac-high-sierra-7c421362b5b5

Faced a similar issue in Mac after upgrading to big sur.升级到 big sur 后在 Mac 中遇到了类似的问题。 The running minikube instance started giving the same error.正在运行的 minikube 实例开始出现相同的错误。

The solution that worked for me was to run a minikube delete , followed by a minikube start .对我有用的解决方案是运行minikube delete ,然后运行minikube start

More combination of this option can be found in the thread below -可以在下面的线程中找到此选项的更多组合 -

https://github.com/kubernetes/minikube/issues/3614 https://github.com/kubernetes/minikube/issues/3614

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM