Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Driver "kvm2" not found. Do you have the plugin binary "docker-machine-driver-kvm2" accessible in your PATH #4833

Closed
BZM708 opened this issue Jul 21, 2019 · 5 comments
Labels
kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@BZM708
Copy link

BZM708 commented Jul 21, 2019

The exact command to reproduce the issue: sudo minikube start --vm-driver kvm2

The full output of the command that failed:<
😄 minikube v1.2.0 on linux (amd64)
⚠️ Please don't run minikube as root or with 'sudo' privileges. It isn't necessary.
🔥 Creating kvm2 VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
E0721 10:44:04.513730 18419 start.go:559] StartHost: new host: Driver "kvm2" not found. Do you have the plugin binary "docker-machine-driver-kvm2" accessible in your PATH?

💣 Unable to start VM
❌ Error: [KVM2_NOT_FOUND] new host: Driver "kvm2" not found. Do you have the plugin binary "docker-machine-driver-kvm2" accessible in your PATH?
💡 Advice: Please install the minikube kvm2 VM driver, or select an alternative --vm-driver
📘 Documentation: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver

😿 If the above advice does not help, please let us know:
👉 https://github.com/kubernetes/minikube/issues/new

@medyagh
Copy link
Member

medyagh commented Jul 22, 2019

@BZM708 I am curious have you tried to follow the advice message that minikube printed out ? to make sure to install the driver ? https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver

@medyagh medyagh added the triage/needs-information Indicates an issue needs more information in order to work on it. label Jul 22, 2019
@BZM708
Copy link
Author

BZM708 commented Jul 22, 2019

I typed these commands in terminal:
<
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
sudo systemctl status libvirtd.service
virsh net-list >

and the output is:
<
Synchronizing state of libvirtd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable libvirtd

● libvirtd.service - Virtualization daemon
Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor preset:
Active: active (running) since Mon 2019-07-22 12:13:39 EDT; 4min 48s ago
Docs: man:libvirtd(8)
https://libvirt.org
Main PID: 1752 (libvirtd)
Tasks: 19 (limit: 32768)
CGroup: /system.slice/libvirtd.service
├─1752 /usr/sbin/libvirtd
├─3611 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default
└─3612 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/default
....

Name State Autostart Persistent

default active yes yes >

Yet when I start the minikube with this command:
< sudo minikube start --vm-driver kvm2 >

It results in the same error as before.

@tstromberg tstromberg changed the title Minikube driver doesn't work Driver "kvm2" not found. Do you have the plugin binary "docker-machine-driver-kvm2" accessible in your PATH Aug 22, 2019
@tstromberg
Copy link
Contributor

tstromberg commented Aug 22, 2019

@BZM708 - First, don't run minikube as root with the kvm driver if you can avoid it. We will soon exit if this case is encountered (#5179). The issue here is either:

Do you mind sharing the output of:

  • ls -la /usr/local/bin/docker-machine-driver-kvm2

If that works, see if /usr/local/bin exists in your path and your sudo path:

  • env | grep "^PATH="
  • sudo env | grep "^PATH="

If not, if you absolutely must use minikube as root, the solution is probably to use sudo -E, which passes your user environment to sudo. Please let me know what you find out!

@tstromberg tstromberg added the kind/support Categorizes issue or PR as a support question. label Aug 22, 2019
@BZM708 BZM708 closed this as completed Aug 27, 2019
@BZM708
Copy link
Author

BZM708 commented Aug 27, 2019

I found another way to use minikube.

Thank you for your help.

@alexcpn
Copy link

alexcpn commented Jan 20, 2020

@BZM708 I am curious have you tried to follow the advice message that minikube printed out ? to make sure to install the driver ? https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver

It is not written in the doc to install the driver - https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/ --> only KVM installation here https://help.ubuntu.com/community/KVM/Installation

Thanks for this

curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 && sudo install docker-machine-driver-kvm2 /usr/local/bin/
from https://fabianlee.org/2019/02/11/kubernetes-running-minikube-locally-on-ubuntu-using-kvm/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests

4 participants