Is this a BUG REPORT or FEATURE REQUEST? (choose one):
bug
Please provide the following details:
Environment:
Fedora 24 (not VM, host)
Minikube version (use minikube version
):
v0.24.1
cat ~/.minikube/machines/minikube/config.json | grep DriverName
):cat ~/.minikube/machines/minikube/config.json | grep -i ISO
or minikube ssh cat /etc/VERSION
):What happened:
when starting minikube with
minikube start --vm-driver kvm2
or with
minikube start --vm-driver kvm
it fails with:
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
E0110 15:27:36.156882 21701 start.go:150] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'').
What you expected to happen:
minikube to start successfully
How to reproduce it (as minimally and precisely as possible):
same issue on Fedora 26
Same issue on latest Fedora 27.
Also seeing this on Arch.
Seems weird that I'm getting this even with vm-driver=none
$ minikube start --vm-driver none
Starting local Kubernetes v1.8.0 cluster...
Starting VM...
E0112 20:49:10.051966 6407 start.go:150] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'').
Retrying.
E0112 20:49:10.052131 6407 start.go:156] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'')
I wonder if it's disregarding my vm-driver selection.
Have you tried to delete and start again? The issue with none likely comes
because it wants to do a a restart, and in that case a change of vmdriver
is ignored
--
Gerard Braad | http://gbraad.nl
[ Doing Open Source Matters ]
@gbraad I have tried, but the issue that I opened here is with kvm/kvm2, not with none.
I built from source (master) as there were several commits that looked relevant since the last release.
however, same error appears
E0116 12:30:06.266210 17392 start.go:162] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'')
```openstack@T400:~$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
E0129 14:58:09.915923 8668 start.go:159] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'').
Retrying.
E0129 14:58:09.916535 8668 start.go:165] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'')
I tried to delete and reinstall everything however had the same issue again, i noticed though that the folder .minikube was still there so i deleted this folder and tried again and then everything was ok. Hopefully this might help someone else as well
openstack@T400:~$ rm -rf .minikube/
openstack@T400:~$ minikube start --vm-driver=kvm2
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Downloading Minikube ISO
142.22 MB / 142.22 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading localkube binary
162.41 MB / 162.41 MB [============================================] 100.00% 0s
0 B / 65 B [----------------------------------------------------------] 0.00%
65 B / 65 B [======================================================] 100.00% 0sSetting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
openstack@T400:~$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
deployment "hello-minikube" created
openstack@T400:~$ kubectl expose deployment hello-minikube --type=NodePort
service "hello-minikube" exposed
openstack@T400:~$ kubectl get pod
NAME READY STATUS RESTARTS AGE
hello-minikube-c6c6764d-cmxw5 0/1 ContainerCreating 0 28s
openstack@T400:~$ curl $(minikube service hello-minikube --url)
Waiting, endpoint for service is not ready yet...
CLIENT VALUES:
client_address=172.17.0.1
command=GET
real path=/
query=nil
request_version=1.1
request_uri=http://192.168.39.60:8080/
SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001
HEADERS RECEIVED:
accept=/
host=192.168.39.60:32025
user-agent=curl/7.47.0
BODY:
-no body in request-openstack@T400:~$
openstack@T400:~$ minikube version
minikube version: v0.25.0
```
@rstoikos I tried now your suggestion of deleting the .minikube folder.
After doing it and running minikube, I got another error (and if I rerun the minikube, I get back to the original error)
> E0129 15:28:30.672583 8639 start.go:150] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: creating domain: Error defining domain xml:
> <domain type='kvm'>
> <name>minikube</name>
> <memory unit='MB'>2048</memory>
> <vcpu>2</vcpu>
> <features>
> <acpi/>
> <apic/>
> <pae/>
> </features>
> <os>
> <type>hvm</type>
> <boot dev='cdrom'/>
> <boot dev='hd'/>
> <bootmenu enable='no'/>
> </os>
> <devices>
> <disk type='file' device='cdrom'>
> <source file='/home/abonas/.minikube/machines/minikube/boot2docker.iso'/>
> <target dev='hdc' bus='scsi'/>
> <readonly/>
> </disk>
> <disk type='file' device='disk'>
> <driver name='qemu' type='raw' cache='default' io='threads' />
> <source file='/home/abonas/.minikube/machines/minikube/minikube.rawdisk'/>
> <target dev='hda' bus='virtio'/>
> </disk>
> <interface type='network'>
> <source network='default'/>
> <mac address='1c:46:54:54:a2:7a'/>
> <model type='virtio'/>
> </interface>
> <interface type='network'>
> <source network='docker-machines'/>
> <mac address='1c:46:54:54:a2:7a'/>
> <model type='virtio'/>
> </interface>
> <serial type='pty'>
> <source path='/dev/pts/2'/>
> <target port='0'/>
> </serial>
> <console type='pty' tty='/dev/pts/2'>
> <source path='/dev/pts/2'/>
> <target port='0'/>
> </console>
> <rng model='virtio'>
> <backend model='random'>/dev/random</backend>
> </rng>
> </devices>
> </domain>
> : virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ').
>
can you try remove everything and retry? :/ i downloaded the latest versions of minikube , docker-machine-driver-kvm2 and kubectl. Finally i followed exactly the steps and installed driver after issuing "newgrp"
newgrp libvirtd
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && chmod +x docker-machine-driver-kvm2 && sudo mv docker-machine-driver-kvm2 /usr/bin/
minikube start --vm-driver kvm2
minikube version: v0.25.0
openstack@T400:~$ kubectl version
Client Version: version.Info{Major:"1", Minor:"9", GitVersion:"v1.9.2", GitCommit:"5fa2db2bd46ac79e5e00a4e6ed24191080aa463b", GitTreeState:"clean", BuildDate:"2018-01-18T10:09:24Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"", Minor:"", GitVersion:"v1.9.0", GitCommit:"925c127ec6b946659ad0fd596fa959be43f0cc05", GitTreeState:"clean", BuildDate:"2018-01-26T19:04:38Z", GoVersion:"go1.9.1", Compiler:"gc", Platform:"linux/amd64"}
openstack@T400:~$
@rstoikos did that.
now I get "internal error: Network is already in use by interface virbr1')
now after a few "delete/stop/clean cache" I get:
virError(Code=55, Domain=19, Message='Requested operation is not valid: network 'minikube-net' is not active')
On Ub16.04, when trying to get kvm2 working, I also found that minikube had made a half-baked ~/.minikube
directory. I moved that out of the way, and also had to change the permissions on /var/run/libvirt
to myuser:libvirtd
, the new group required for kvm2 install. Then, when I ran minikube for the first time and it had pulled down a new minikube image, it made the right ~/.minikube
dir.
after successfully doing a setup of minishift, the minikube also started to work. I have no explanation what is the part that made it work, but I'm closing this issue.
I have a problem (again) starting minikube. will open a separate issue.
please detail your setup, especially as you mentioned to use Minishift. Minishift only uses the older kvm driver, so perhaps you used this (kvm) by accident with minikube instead.
also be sure to perform minikube delete
or minishift delete
between runs, as a restart scenario will use the previously specified driver, might print the wrong info to the command line.
@gbraad I detailed the setup in the first comment. I did minikube delete many times. also deleted the .minikube folder and the cache. I opened another issue on the current error https://github.com/kubernetes/minikube/issues/2513
I also had this issue ..
I could start minikube only as root ..
After I changed the owner on /var/run/libvirt to my user
sudo chown -R phico:libvirtd /var/run/libvirt
Then a little cleaning (minikube delete rm .minikube)
Now it starts !
Same issue on Centos7, Minikube 0.25.2
It could be like that because of my openstack cloud VM config.
CentOS Linux release 7.4.1708 (Core)
KVM2
# virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
minikube-net active yes yes
there is no 'default' one so if I run like that:
# minikube start --vm-driver kvm2
it's going to fail
Starting VM...
E0509 15:16:02.440382 1485 start.go:159] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: Error creating VM: virError(Code=43, Domain=19, Message='Network not found: no network with matching name 'default'').
to make it work:
# minikube start --vm-driver kvm2 --kvm-network minikube-net
KVM
# virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
docker-machines active yes yes
Similar like above to make it work:
# minikube start --vm-driver kvm --kvm-network docker-machines
Had the same error. Could run it as root though. Possible permissioning issues somewhere.
I had the same issue. Ended up being problem with KVM setup. I corrected KVM and then deleted minikube and reinstalled. Now all is well.
Have the same error.
Have tried:
So far nothing has worked.
For me, it was a full hard disk!
minikube/kvm2 tries to create .minikube/machines/minikube/minikube.rawdisk with ~20GB.
Seems like there's no error message if there's not enough room...
Also try:
sudo apt-get install ebtables
sudo systemctl restart libvirtd
minikube delete
minikube start --vm-driver=kvm2
minikube delete
helped to me
On Centos7 i had to run
sudo systemctl restart libvirtd
I had the same problem running on Google Cloud. Turns out nested virtualization is not enabled by default on the GCE VMs - but it's quite easy to enable by building your own image using the docs here: https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances
$ rm -rf .minikube/
$ minikube start --vm-driver=kvm2
but happened msg as bellow.
virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm '
That could be that your user is not in _libvirt_ group (or you added user to group without relogin)
I first tried newgrp
but it had no effect. Removing .minikube
(I actually just renamed it) solved the problem for me.
$ rm -rf .minikube/
$ minikube start --vm-driver=kvm2
but happened msg as bellow.virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm '
same issue
Looks like minikube delete
when you've got a broken cluster.
Then fix the underlying issue, for me that was: https://github.com/kubernetes/minikube/issues/2968
I enabled cpu counters on my vmware settings.
And was rewarded with:
➜ ~ minikube delete
Deleting local Kubernetes cluster...
Machine deleted.
➜ ~ minikube start --vm-driver kvm2
Starting local Kubernetes v1.13.2 cluster...
Starting VM...
Getting VM IP address...
Moving files into cluster...
Downloading kubelet v1.13.2
Downloading kubeadm v1.13.2
Finished Downloading kubeadm v1.13.2
Finished Downloading kubelet v1.13.2
Setting up certs...
Connecting to cluster...
Setting up kubeconfig...
Stopping extra container runtimes...
Starting cluster components...
Verifying kubelet health ...
Verifying apiserver health ...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
Everything looks great. Please enjoy minikube!
➜ ~
Have you tried to delete and start again? The issue with none likely comes because it wants to do a a restart, and in that case a change of vmdriver is ignored
…
-- Gerard Braad | http://gbraad.nl [ Doing Open Source Matters ]
minikube delete
and then
minikube start --vm-driver kvm2
ubuntu 18.04
1.
virt-host-validate
QEMU: Checking if device /dev/kvm is accessible: FAIL
If the mentioned test does not pass for you try this link: https://askubuntu.com/questions/1050621/kvm-is-required-to-run-this-avd then restart your machine
To make kvm2 the default driver:
minikube config set vm-driver kvm2
then:
minikube delete
minikube start
Most helpful comment
```openstack@T400:~$ minikube start
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
E0129 14:58:09.915923 8668 start.go:159] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'').
Retrying.
E0129 14:58:09.916535 8668 start.go:165] Error starting host: Error getting state for host: getting connection: looking up domain: virError(Code=42, Domain=10, Message='Domain not found: no domain with matching name 'minikube'')
openstack@T400:~$ rm -rf .minikube/
openstack@T400:~$ minikube start --vm-driver=kvm2
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
Downloading Minikube ISO
142.22 MB / 142.22 MB [============================================] 100.00% 0s
Getting VM IP address...
Moving files into cluster...
Downloading localkube binary
162.41 MB / 162.41 MB [============================================] 100.00% 0s
0 B / 65 B [----------------------------------------------------------] 0.00%
65 B / 65 B [======================================================] 100.00% 0sSetting up certs...
Connecting to cluster...
Setting up kubeconfig...
Starting cluster components...
Kubectl is now configured to use the cluster.
Loading cached images from config file.
openstack@T400:~$ kubectl run hello-minikube --image=k8s.gcr.io/echoserver:1.4 --port=8080
deployment "hello-minikube" created
openstack@T400:~$ kubectl expose deployment hello-minikube --type=NodePort
service "hello-minikube" exposed
openstack@T400:~$ kubectl get pod
NAME READY STATUS RESTARTS AGE
hello-minikube-c6c6764d-cmxw5 0/1 ContainerCreating 0 28s
openstack@T400:~$ curl $(minikube service hello-minikube --url)
Waiting, endpoint for service is not ready yet...
CLIENT VALUES:
client_address=172.17.0.1
command=GET
real path=/
query=nil
request_version=1.1
request_uri=http://192.168.39.60:8080/
SERVER VALUES:
server_version=nginx: 1.10.0 - lua: 10001
HEADERS RECEIVED:
accept=/
host=192.168.39.60:32025
user-agent=curl/7.47.0
BODY:
-no body in request-openstack@T400:~$
openstack@T400:~$ minikube version
minikube version: v0.25.0
```