VMWare工作站Ubuntu 18.04-Minikube:创建VM时出错:

时间:2018-10-05 09:06:27

标签: ubuntu kubernetes vmware minikube

我试图在运行Ubuntu 18.04的VMWare Workstation guest虚拟机中运行Minikube。

kubectl version导致:

Client Version: version.Info{Major:"1", Minor:"12", GitVersion:"v1.12.0", GitCommit:"0ed33881dc4355495f623c6f22e7dd0b7632b7c0", GitTreeState:"clean", BuildDate:"2018-09-27T17:05:32Z", GoVersion:"go1.10.4", Compiler:"gc", Platform:"linux/amd64"}

minikube version导致:

minikube version: v0.29.0

我已在VMWare客户机配置上启用了虚拟化Intel VT-x / EPT或AMD-V / RVI。我有25GB的硬盘空间。但是,无论我如何尝试启动Minikube,都会出现以下错误:

Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E1005 11:02:32.495579    5913 start.go:168] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: Error creating VM: virError(Code=1, Domain=10, Message='internal error: qemu unexpectedly closed the monitor: 2018-10-05T09:02:29.926633Z qemu-system-x86_64: error: failed to set MSR 0x38d to 0x0
qemu-system-x86_64: /build/qemu-11gcu0/qemu-2.11+dfsg/target/i386/kvm.c:1807: kvm_put_msrs: Assertion `ret == cpu->kvm_msr_buf->nmsrs' failed.').

 Retrying.

我尝试过的命令:

minikube start --vm-driver=kvm2

minikube start --vm-driver=kvm

minikube start --vm-driver=none

所有结果都相同。

我注意到在Ubuntu客户机上,运行minikube start时,网络不久将断开连接并重新连接。网络驱动程序有问题吗?我该如何调试?

2 个答案:

答案 0 :(得分:2)

显然让virtualbox作为依赖项可以用作vm驱动程序。

sudo apt install virtualbox virtualbox-ext-pack

minikube start --vm-driver=virtualbox

现在导致:

Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubeadm v1.10.0
Downloading kubelet v1.10.0
Finished Downloading kubelet v1.10.0
Finished Downloading kubeadm v1.10.0
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...

答案 1 :(得分:2)

我在Ubuntu 18.04.1 VM(英特尔)上观察到类似的问题,我发现的解决方案是:

  1. 从控制台运行此命令:
$ sudo cat > /etc/modprobe.d/qemu-system-x86.conf << EOF
options kvm_intel nested=1 enable_apicv=n
options kvm ignore_msrs=1
EOF
  1. 重新启动VM