dhiltgen / docker-machine-kvm

KVM driver for docker-machine
Apache License 2.0
377 stars 111 forks source link

docker-machine-kvm

KVM driver for docker-machine

This driver leverages the new plugin architecture being developed for Docker Machine.

Quick start instructions

Dependencies

This driver leverages libvirt and the libvirt-go library to create and manage KVM based virtual machines. It has been tested with Ubuntu 12.04 through 15.04 and should work on most platforms with KVM/libvirt support. If you run into compatibility problems, please file an issue.

Typically you'll run docker-machine as yourself, so you'll want to follow your distro specific instructions on allowing libvirt access from your account. For most distro's, you accomplish this by adding your account to the libvirtd group.

Capabilities

Images

By default docker-machine-kvm uses a boot2docker.iso as guest os for the kvm hypervisior. It's also possible to use every guest os image that is derived from boot2docker.iso as well. For using another image use the --kvm-boot2docker-url parameter.

Community Members did some tests and it works with rancher/os as guest os too.

Dual Network

Driver Parameters

Here are all currently driver parameters listed that you can use.

Parameter Description
--kvm-cpu-count Sets the used CPU Cores for the KVM Machine. Defaults to 1 .
--kvm-disk-size Sets the kvm machine Disk size in MB. Defaults to 20000 .
--kvm-memory Sets the Memory of the kvm machine in MB. Defaults to 1024.
--kvm-network Sets the Network of the kvm machinee which it should connect to. Defaults to default.
--kvm-boot2docker-url Sets the url from which host the image is loaded. By default it's not set.
--kvm-cache-mode Sets the caching mode of the kvm machine. Defaults to default.
--kvm-io-mode-url Sets the disk io mode of the kvm machine. Defaults to threads.