Skip to content

Commit

Permalink
Improve kvm2 documentation, mention v1.3.1 req
Browse files Browse the repository at this point in the history
  • Loading branch information
tstromberg authored May 24, 2019
1 parent 1a24097 commit fea7e21
Showing 1 changed file with 21 additions and 36 deletions.
57 changes: 21 additions & 36 deletions docs/drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,81 +16,66 @@ the host PATH:

## KVM2 driver

To install the KVM2 driver, first install and configure the prereqs:
To install the KVM2 driver, first install and configure the prerequisites, namely libvirt 1.3.1 or higher, and qemu-kvm:

* Debian or Ubuntu 18.x:
* Debian or Ubuntu 18.x: `sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm`
* Ubuntu 16.x or older: `sudo apt install libvirt-bin libvirt-daemon-system qemu-kvm`
* Fedora/CentOS/RHEL: `sudo yum install libvirt-daemon-kvm qemu-kvm`

```shell
sudo apt install libvirt-clients libvirt-daemon-system qemu-kvm
```
Check your installed virsh version:

`virsh --version`

If your version of virsh is newer than 1.3.1 (January 2016), you may download our pre-built driver:

* Ubuntu 16.x or older:

```shell
sudo apt install libvirt-bin libvirt-daemon-system qemu-kvm
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \
&& sudo install docker-machine-driver-kvm2 /usr/local/bin/
```

* Fedora/CentOS/RHEL:
If your version of virsh is older than 1.3.1 (Januarry 2016), you may build your own driver binary if you have go 1.12+ installed.

```shell
sudo yum install libvirt-daemon-kvm qemu-kvm
$ sudo apt install libvirt-dev
$ git clone https://github.com/kubernetes/minikube.git
$ cd minikube
$ make out/docker-machine-driver-kvm2
$ sudo install out/docker-machine-driver-kvm2 /usr/local/bin
```

Enable,start, and verify the `libvirtd` service has started.
To finish the kvm installation, start and verify the `libvirtd` service

```shell
sudo systemctl enable libvirtd.service
sudo systemctl start libvirtd.service
sudo systemctl status libvirtd.service
```

Then you will need to add yourself to `libvirt` group (older distributions may use `libvirtd` instead)
Add your user to `libvirt` group (older distributions may use `libvirtd` instead)

```shell
sudo usermod -a -G libvirt $(whoami)
```

Then to join the group with your current user session:
Join the `libvirt` group with your current shell session:

```shell
newgrp libvirt
```

Now install the driver:

```shell
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-kvm2 \
&& sudo install docker-machine-driver-kvm2 /usr/local/bin/
```

NOTE: Ubuntu users on a release older than 18.04, or anyone experiencing [#3206: Error creating new host: dial tcp: missing address.](https://github.com/kubernetes/minikube/issues/3206) you will need to build your own driver until [#3689](https://github.com/kubernetes/minikube/issues/3689) is resolved. Building this binary will require [Go v1.12](https://golang.org/dl/) or newer to be installed.

```shell
$ sudo apt install libvirt-dev
$ git clone https://github.com/kubernetes/minikube.git
$ cd minikube
$ make out/docker-machine-driver-kvm2
$ sudo install out/docker-machine-driver-kvm2 /usr/local/bin
```

To use the kvm2 driver:

```shell
minikube start --vm-driver kvm2
```

or, to use kvm2 as a default driver:
or, to use kvm2 as a default driver for `minikube start`:

```shell
minikube config set vm-driver kvm2
```

and run minikube as usual:

```shell
minikube start
```

## Hyperkit driver

Install the [hyperkit](http://github.com/moby/hyperkit) VM manager using [brew](https://brew.sh):
Expand Down

0 comments on commit fea7e21

Please sign in to comment.