Minikube 在 VirtualBox 上没有 运行

Minikube doesn't run on VirtualBox

我在 Ubuntu 18.04 和 minikube 版本 1.0.1 上设置了 VirtualBox 6.0.6,当我 运行 下一个命令时

minikube start

我得到了下一个错误日志

minikube v1.0.1 on linux (amd64) Downloading Kubernetes v1.14.1 images in the background ... Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...

Unable to start VM: create: creating: Unable to start the VM: /usr/bin/VBoxManage startvm minikube --type headless failed: VBoxManage: error: The virtual machine 'minikube' has terminated unexpectedly during startup with exit code 1 (0x1) VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine

Sorry that minikube crashed. If this was unexpected, we would love to hear from you: https://github.com/kubernetes/minikube/issues/new

运行 接下来的两个命令为我解决了问题:

1- sudo apt autoremove 
2- sudo /sbin/vboxconfig

注意:当您 运行 第二个命令行“sudo /sbin/vboxconfig”时,您必须在日志中看到 Building VirtualBox kernal modules 消息,诸如此类

vboxdrv.sh: Stopping VirtualBox services.

vboxdrv.sh: Starting VirtualBox services.

vboxdrv.sh: Building VirtualBox kernel modules.