qemu

package module
v0.0.0-...-b580f6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2017 License: Apache-2.0, MIT Imports: 17 Imported by: 0

README

QEMU Docker Machine Driver Plugin

The Docker Machine plugin for QEMU enables the use of the QEMU hypervisor with Docker-Machine

Requirements

Linux
  • QEMU (qemu-system-x86_64 & qemu-img) in path -2.5.0+ Tested but other expected to work
  • KVM available
Windows

Install from Binary

Please see the release tab and place the plugin in your PATH

Install from Source

go get github.com/intel-iot-devkit/docker-machine-driver-qemu
cd <GO-ROOT>/src/github.com/intel-iot-devkit/docker-machine-driver-qemu
GOOS=windows go build -i -o docker-machine-driver-qemu.exe ./bin
#OR
GOOS=linux go build -i -o docker-machine-driver-qemu ./bin

An place the binary in your path!

Usage

The usual Docker Machine commands apply:

docker-machine create --driver qemu qemumachine
docker-machine env qemumachine

On Windows QEMU_LOCATION must be set to the location where the

Limitations

  • Ports: QEMU will not generally respect forwarding the network traffic to the docker-machine. During creation, you need to explicitly state the port ranges you wish to use For example: --qemu-open-ports 8022,1111,1231-1235
  • Mounts: Using mounts into containers is not supported.
  • Concurrent usage: One instance of a machine using QEMU driver is possible at this time. The provisioner does not handle NATd Docker Ports.

CLI Options/Environment variables and defaults:

CLI option Environment variable Default
--qemu-vcpu-count QEMU_CPU_COUNT 2
--qemu-memory-size QEMU_MEMORY_SIZE 1024
--qemu-disk-size QEMU_DISK_SIZE 18000 Grows with qcow2 to this limit
--qemu-boot2docker-url QEMU_BOOT2DOCKER_URL boot2docker URL
--qemu-open-ports - -

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
	*drivers.BaseDriver

	MonitorPort    int
	Disk           string
	DiskSize       int
	Cpus           int
	Mem            int
	QemuLocation   string
	EnginePort     int
	OpenPorts      []int
	Boot2DockerURL string
}

Driver driver struct

func (*Driver) Create

func (d *Driver) Create() error

Create the machiene

func (*Driver) DriverName

func (d *Driver) DriverName() string

DriverName name

func (*Driver) GetCreateFlags

func (d *Driver) GetCreateFlags() []mcnflag.Flag

GetCreateFlags Create flags

func (*Driver) GetSSHHostname

func (d *Driver) GetSSHHostname() (string, error)

GetSSHHostname get the hostname for ssh

func (*Driver) GetState

func (d *Driver) GetState() (state.State, error)

GetState return instance status

func (*Driver) GetURL

func (d *Driver) GetURL() (string, error)

GetURL returns docker daemon URL on this machine

func (*Driver) Kill

func (d *Driver) Kill() (err error)

Kill machine

func (*Driver) PreCreateCheck

func (d *Driver) PreCreateCheck() error

PreCreateCheck checks that the machine creation process can be started safely.

func (*Driver) Remove

func (d *Driver) Remove() error

Remove the machine

func (*Driver) Restart

func (d *Driver) Restart() error

Restart this docker-machine

func (*Driver) SetConfigFromFlags

func (d *Driver) SetConfigFromFlags(flags drivers.DriverOptions) error

SetConfigFromFlags Set the config from the flags

func (*Driver) Start

func (d *Driver) Start() error

Start the machine

func (*Driver) Stop

func (d *Driver) Stop() error

Stop the machine

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL