$ sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
Follow the appropriate procedure to set up the hypervisor for your particular operating system. Minishift uses libmachine and its driver plug-in architecture to provide a consistent way to manage the Minishift VM.
Some hypervisors require manual installation of the driver plug-in.
Minishift embeds the VirtualBox driver plug-in, so no additional steps are required to configure it.
However, VirtualBox will need to be identified to Minishift via the --vm-driver virtualbox
flag or persistant configuration settings.
See Setting Up Minishift to Use VirtualBox for more information.
See the appropriate section for your hypervisor and operating system:
For VirtualBox, set up Minishift to use VirtualBox
Minishift is currently tested against docker-machine-driver-kvm
version 0.10.0.
Proceed to the instructions for your Linux distribution after you have set up the docker-machine-driver-kvm
binary.
For more information, see the GitHub documentation of the Docker Machine KVM driver.
Install libvirt and qemu-kvm on your system:
For Ubuntu-18.10
$ sudo apt install qemu-kvm libvirt-daemon libvirt-daemon-system
For older Ubuntu versions
$ sudo apt install libvirt-bin qemu-kvm
Add yourself to the libvirt(d) group:
For Ubuntu-18.10
$ sudo usermod -a -G libvirt $(whoami)
For older Ubuntu versions
$ sudo usermod -a -G libvirtd $(whoami)
Update your current session to apply the group change:
For Ubuntu-18.10
$ newgrp libvirt
For older Ubuntu versions
$ newgrp libvirtd
As root, install the KVM driver binary and make it executable as follows:
For Ubuntu-16.04 and higher
# curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu16.04 -o /usr/local/bin/docker-machine-driver-kvm # chmod +x /usr/local/bin/docker-machine-driver-kvm
For Ubuntu-14.04
# curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-ubuntu14.04 -o /usr/local/bin/docker-machine-driver-kvm # chmod +x /usr/local/bin/docker-machine-driver-kvm
Install libvirt and qemu-kvm on your system:
$ sudo dnf install libvirt qemu-kvm
Add yourself to the libvirt group:
$ sudo usermod -a -G libvirt $(whoami)
Update your current session to apply the group change:
$ newgrp libvirt
As root, install the KVM driver binary and make it executable as follows:
# curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7 -o /usr/local/bin/docker-machine-driver-kvm # chmod +x /usr/local/bin/docker-machine-driver-kvm
Install libvirt, qemu, dnsmasq and ebtables on your system:
$ sudo pacman -S libvirt qemu dnsmasq ebtables
Add yourself to the kvm and libvirt groups:
$ sudo usermod -a -G kvm,libvirt $(whoami)
Update the libvirt configuration in /etc/libvirt/qemu.conf as follows:
$ sudo sed -ri 's/.?group\s?=\s?".+"/group = "kvm"/1' /etc/libvirt/qemu.conf
Update your current session to apply the group change:
$ newgrp libvirt
As root, install the KVM driver binary and make it executable as follows:
# curl -L https://github.com/dhiltgen/docker-machine-kvm/releases/download/v0.10.0/docker-machine-driver-kvm-centos7 -o /usr/local/bin/docker-machine-driver-kvm # chmod +x /usr/local/bin/docker-machine-driver-kvm
Check the status of libvirtd:
$ systemctl is-active libvirtd
If libvirtd is not active, start the libvirtd service:
$ sudo systemctl start libvirtd
Some distributions set up the default libvirt network for you, while on others this might have to be done manually.
Check your network status:
$ sudo virsh net-list --all Name State Autostart Persistent --------------------------------------------------------- default active yes yes
If your output looks like the above then you’re done.
However, if State
is not active
or Autostart
is not yes
you’ll need to follow the steps below.
Start the default libvirt network:
$ sudo virsh net-start default
Now mark the default network as autostart:
$ sudo virsh net-autostart default
Proceed to Installing Minishift once your hypervisor has been installed and configured.
Minishift is currently tested against docker-machine-driver-hyperkit version 1.0.0.
Using hyperkit requires having both hyperkit
and docker-machine-driver-hyperkit
installed
If you have Docker Desktop for macOS installed, hyperkit
is already installed.
If you use Homebrew you can install the latest version of hyperkit
:
$ brew install hyperkit
If you use Homebrew you can install the latest version of docker-machine-driver-hyperkit
:
$ brew install docker-machine-driver-hyperkit
Alternatively, you can download and install the docker-machine-driver-hyperkit binary and place it in a directory which is on your PATH
environment variable. The directory /usr/local/bin is a good choice, since it is the default installation directory for Docker Machine binaries.
The following steps explain the installation of the docker-machine-driver-hyperkit binary to the /usr/local/bin/ directory:
Download the docker-machine-driver-hyperkit binary using:
$ sudo curl -L https://github.com/machine-drivers/docker-machine-driver-hyperkit/releases/download/v1.0.0/docker-machine-driver-hyperkit -o /usr/local/bin/docker-machine-driver-hyperkit
Enable root access for the docker-machine-driver-hyperkit binary and add it to the default wheel group:
$ sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit
Set owner User ID (SUID) for the binary as follows:
$ sudo chmod u+s,+x /usr/local/bin/docker-machine-driver-hyperkit
The downloaded docker-machine-driver-hyperkit binary is compiled against a specific version of macOS. It is possible that the driver will fail to work after a macOS version upgrade. In this case you can try to compile the driver from source: $ go get -u -d github.com/machine-drivers/docker-machine-driver-hyperkit $ cd $GOPATH/src/github.com/machine-drivers/docker-machine-driver-hyperkit # Install docker-machine-driver-hyperkit binary into /usr/local/bin $ make build For more information, see the hyperkit driver documentation on GitHub. |
Proceed to Installing Minishift once your hypervisor has been installed and configured.
On macOS, you may also install Minishift via Homebrew.
To use Minishift with Hyper-V:
Install Hyper-V.
Add the user to the local Hyper-V Administrators group.
This is required to allow the user to create and delete virtual machines with the Hyper-V Management API. For more information, see Hyper-V commands must be run as an Administrator. |
Add an External Virtual Switch.
Verify that you pair the virtual switch with a network card (wired or wireless) that is connected to the network.
Use the configuration option hyperv-virtual-switch
or startup flag --hyperv-virtual-switch
to set the name of the external virtual switch you want to use for Minishift.
For example, on PowerShell use
PS> minishift config set hyperv-virtual-switch "External (Wireless)"
or
PS> minishift start --hyperv-virtual-switch "External (Wireless)"
|
Proceed to Installing Minishift once your hypervisor has been installed and configured.
VirtualBox must be manually installed in order to use the embedded VirtualBox drivers. VirtualBox version 5.1.12 or later is required. Ensure that you download and install VirtualBox before using the embedded drivers.
VirtualBox must be identified to Minishift through either the --vm-driver virtualbox
flag or persistant configuration options.
The --vm-driver virtualbox
flag will need to be given on the command line each time the minishift start
command is run.
For example:
$ minishift start --vm-driver virtualbox
Setting the vm-driver
option as a persistent configuration option allows you to run minishift start
without explicitly passing the --vm-driver virtualbox
flag each time.
You may set the vm-driver
persistent configuration option as follows:
$ minishift config set vm-driver virtualbox
The |
Proceed to Installing Minishift once your hypervisor has been installed and configured.