minikube start (kvm) fails

Created on 26 Apr 2017  路  5Comments  路  Source: kubernetes/minikube

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
BUG REPORT

Minikube version (use minikube version):
v0.18.0

Environment:

  • OS (e.g. from /etc/os-release):
    SUSE Linux Enterprise Server 12 SP2
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName):
    kvm
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION):
    "ISO": "/root/.minikube/machines/minikube/boot2docker.iso",
    "Boot2DockerURL": "file:///root/.minikube/cache/iso/minikube-v0.18.0.iso",
  • Install tools:
  • Others:
    dfl30008412a:/usr/local/bin # virsh version
    Compiled against library: libvirt 2.0.0
    Using library: libvirt 2.0.0
    Using API: QEMU 2.0.0
    Running hypervisor: QEMU 2.6.2

What happened:
wdfl30008412a:~ # minikube start
Starting local Kubernetes cluster...
Starting VM...
E0426 16:00:31.437031 11838 start.go:116] Error starting host: Error starting stopped host: [Code-1] [Domain-10] internal error: process exited while connecting to monitor: 2017-04-26T14:00:31.359042Z qemu-system-x86_64: -drive file=/root/.minikube/machines/minikube/minikube.img,format=raw,if=none,id=drive-ide0-0-0,aio=threads: Could not open '/root/.minikube/machines/minikube/minikube.img': Operation not permitted.

Retrying.
E0426 16:00:31.437277 11838 start.go:122] Error starting host: Error starting stopped host: [Code-1] [Domain-10] internal error: process exited while connecting to monitor: 2017-04-26T14:00:31.359042Z qemu-system-x86_64: -drive file=/root/.minikube/machines/minikube/minikube.img,format=raw,if=none,id=drive-ide0-0-0,aio=threads: Could not open '/root/.minikube/machines/minikube/minikube.img': Operation not permitted

What you expected to happen:
I expected minikube to start.

How to reproduce it (as minimally and precisely as possible):
See above.

Anything else do we need to know:
Running minikube start (I added driver kvm to the config) creates a file /root/.minikube/machines/minikube/minikube.img that can't be read by root.
wdfl30008412a:~ # more /root/.minikube/machines/minikube/minikube.img
more: cannot open /root/.minikube/machines/minikube/minikube.img: Operation not permitted
wdfl30008412a:~ # file /root/.minikube/machines/minikube/minikube.img
/root/.minikube/machines/minikube/minikube.img: writable, regular file, no read permission
wdfl30008412a:~ # lsattr /root/.minikube/machines/minikube/minikube.img
lsattr: Operation not permitted While reading flags on /root/.minikube/machines/minikube/minikube.img

I have disabled apparmor. Didn't help. I didn't even know it was possible to create a file that can't be read by root, but here we are.
I straced minikube and the file is created by the minikube executable, but I did not find anything suspicious in the strace that could cause this, so I am at my wits end.
Please advise.
Thanks, Klaus-Georg

kinsupport

Most helpful comment

Is this closed just because it got old? I have this same issue in 2019 >)

All 5 comments

Are you running minikube as root? You should be running as your user, who is part of the libvirtd group.

Hi r2d4,
I started running minikube as non-root user, had the same issue. Running as root was a try to get around permission problems, which failed.

Can you try a minikube delete (you may need to run as root if you've ran minikube start as root) and then try minikube start without root and post those errors? You may also want to clean up the directory at /root/.minikube

Hi,
did that:
D034879@wdfl30008412a: > minikube start --vm-driver=kvm
Starting local Kubernetes cluster...
Starting VM...
Downloading Minikube ISO
89.51 MB / 89.51 MB [==============================================] 100.00% 0s
E0428 12:11:58.198648 14541 start.go:116] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: [Code-1] [Domain-10] internal error: process exited while connecting to monitor: 2017-04-28T10:11:56.099407Z qemu-system-x86_64: -drive file=/home/D034879/.minikube/machines/minikube/minikube.img,format=raw,if=none,id=drive-ide0-0-0,aio=threads: Could not open '/home/D034879/.minikube/machines/minikube/minikube.img': Operation not permitted.
D034879@wdfl30008412a:~> id
uid=2034879(D034879) gid=17(audio) groups=17(audio),10(wheel),478(libvirt),5057(DLM_Customer),608196627(PSSDEV_CUSTOMER),1060111790(LABS_MAC_dewdfms0022_local_admins)

As I said, that's what I tried first.

Is this closed just because it got old? I have this same issue in 2019 >)

Was this page helpful?
0 / 5 - 0 ratings