Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

minikube: could not find capabilities for domaintype=kvm

What are installed for minikube:

$ ls -al /usr/local/bin/
-rwxr-xr-x  1 root root     26406912 Jun 14 12:05 docker-machine
-rwxrwxr-x  1 me libvirtd 11889064 Jun 14 12:07 docker-machine-driver-kvm
-rwxrwxr-x  1 me me     70232912 Jun 14 11:58 kubectl
-rwxrwxr-x  1 me me     82512696 Jun 14 11:57 minikube

Trying to start cluster by minikube

$ minikube start --vm-driver=kvm
Starting local Kubernetes v1.6.4 cluster...
Starting VM...
E0614 12:07:39.515994   14655 start.go:127] Error starting host: Error creating host: Error creating machine: Error in driver during machine creation: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ').

 Retrying.
E0614 12:07:39.517076   14655 start.go:133] Error starting host:  Error creating host: Error creating machine: Error in driver during machine creation: virError(Code=8, Domain=44, Message='invalid argument: could not find capabilities for domaintype=kvm ')

I am new to kubernetes. Any idea how to fix it? Thanks

UPDATE

sudo /usr/sbin/kvm-ok 
INFO: /dev/kvm does not exist
HINT:   sudo modprobe kvm_intel
INFO: Your CPU supports KVM extensions
INFO: KVM (vmx) is disabled by your BIOS
HINT: Enter your BIOS setup and enable Virtualization Technology (VT),
      and then hard poweroff/poweron your system
KVM acceleration can NOT be used

$ dmesg | grep kvm
[    2.114855] kvm: disabled by bios
[    2.327746] kvm: disabled by bios
[  120.423249] kvm: disabled by bios
[  222.250977] kvm: disabled by bios
like image 666
BAE Avatar asked Jun 14 '17 16:06

BAE


2 Answers

My update is close to the solution. The solution is to enable virtualization in the BIOS.

1, Power on your PC and open the BIOS.

2, Go to the security section and enable virtualization.

like image 142
BAE Avatar answered Nov 19 '22 15:11

BAE


you need to install the kvm package refer package.

https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm-driver

# Install libvirt and qemu-kvm on your system, e.g.
# Debian/Ubuntu
$ sudo apt install libvirt-bin qemu-kvm
# Fedora/CentOS/RHEL
$ sudo yum install libvirt-daemon-kvm kvm

# Add yourself to the libvirtd group (use libvirt group for rpm based distros) so you don't need to sudo
# Debian/Ubuntu (NOTE: For Ubuntu 17.04 change the group to `libvirt`)
$ sudo usermod -a -G libvirtd $(whoami)
# Fedora/CentOS/RHEL
$ sudo usermod -a -G libvirt $(whoami)

# Update your current session for the group change to take effect
# Debian/Ubuntu (NOTE: For Ubuntu 17.04 change the group to `libvirt`)
$ newgrp libvirtd
# Fedora/CentOS/RHEL
$ newgrp libvirt
like image 36
sfgroups Avatar answered Nov 19 '22 17:11

sfgroups