github.com/ranjib/nomad@v0.1.1-0.20160225204057-97751b02f70b/website/source/docs/drivers/qemu.html.md (about)

     1  ---
     2  layout: "docs"
     3  page_title: "Drivers: Qemu"
     4  sidebar_current: "docs-drivers-qemu"
     5  description: |-
     6    The Qemu task driver is used to run virtual machines using Qemu/KVM.
     7  ---
     8  
     9  # Qemu Driver
    10  
    11  Name: `qemu`
    12  
    13  The `Qemu` driver provides a generic virtual machine runner. Qemu can utilize
    14  the KVM kernel module to utilize hardware virtualization features and provide
    15  great performance. Currently the `Qemu` driver can map a set of ports from the
    16  host machine to the guest virtual machine, and provides configuration for
    17  resource allocation.
    18  
    19  The `Qemu` driver can execute any regular `qemu` image (e.g. `qcow`, `img`,
    20  `iso`), and is currently invoked with `qemu-system-x86_64`.
    21  
    22  ## Task Configuration
    23  
    24  The `Qemu` driver supports the following configuration in the job spec:
    25  
    26  * `artifact_source` - The hosted location of the source Qemu image. Must be accessible
    27    from the Nomad client, via HTTP.
    28  
    29  * `checksum` - (Optional) The checksum type and value for the `artifact_source` image.
    30    The format is `type:value`, where type is any of `md5`, `sha1`, `sha256`, or `sha512`,
    31    and the value is the computed checksum. If a checksum is supplied and does not
    32    match the downloaded artifact, the driver will fail to start
    33  
    34  * `accelerator` - (Optional) The type of accelerator to use in the invocation.
    35    If the host machine has `Qemu` installed with KVM support, users can specify
    36    `kvm` for the `accelerator`. Default is `tcg`
    37  
    38  * `port_map` - (Optional) A `map[string]int` that maps port labels to ports
    39    on the guest. This forwards the host port to the guest vm. For example,
    40    `port_map { db = 6539 }` would forward the host port with label `db` to the
    41    guest vm's port 6539.
    42  
    43  ## Client Requirements
    44  
    45  The `Qemu` driver requires Qemu to be installed and in your system's `$PATH`.
    46  The `artifact_source` must be accessible by the node running Nomad. This can be an
    47  internal source, private to your cluster, but it must be reachable by the client
    48  over HTTP.
    49  
    50  ## Client Attributes
    51  
    52  The `Qemu` driver will set the following client attributes:
    53  
    54  * `driver.qemu` - Set to `1` if Qemu is found on the host node. Nomad determines
    55  this by executing `qemu-system-x86_64 -version` on the host and parsing the output
    56  * `driver.qemu.version` - Version of `qemu-system-x86_64`, ex: `2.4.0`
    57  
    58  ## Resource Isolation
    59  
    60  Nomad uses Qemu to provide full software virtualization for virtual machine
    61  workloads. Nomad can use Qemu KVM's hardware-assisted virtualization to deliver
    62  better performance.
    63  
    64  Virtualization provides the highest level of isolation for workloads that
    65  require additional security, and resource use is constrained by the Qemu
    66  hypervisor rather than the host kernel. VM network traffic still flows through
    67  the host's interface(s).