Nomad
Install the Virt task driver plugin
Beta Feature: The Virt task driver is in beta and under active development. Refer to the repo README for the latest updates. Do not use this driver in production environments.
The Virt task driver plugin for Linux operating systems is not bundled with Nomad. You must install the driver into each Nomad client's configured plugin directory.
Prerequisites
Your Nomad client must meet these requirements:
- Run as root.
- Able to run hardware-accelerated KVM virtual machines. Run the kvm-ok command to verify your client capabilities.
The Virt driver requires the following packages:
- bridge-utils
- cloudinit
- dnsmasq
- iptables
- libvirt daemon
- QEMU
Install the Virt task driver plugin
Download a precompiled binary and verify the binary using the
available SHA-256 sums. Unzip the package. Make sure that the
nomad-driver-virt
binary is on your
plugin_dir path, specified by the
client's config file, before continuing with the other guides.
Add the Virt task driver plugin to Nomad
This example shows the default plugin configuration.
plugin "nomad-driver-driver" {
config {
data_dir = "/var/lib/virt"
image_paths = ["/var/lib/virt", "${ALLOC_DIR}"]
emulator {
uri = "qemu:///system"
user = ""
password = ""
}
}
}
data_dir
- (default:"/var/lib/virt"
) - the directory for storing VM configuration files and intermediate files.image_paths
- (default:["/var/lib/virt", "${ALLOC_DIR}"]
) - an allow-list of paths the driver is allowed to load an image from.emulator
- (block)
Next steps
Learn how to use the Virt task driver in your Nomad job specification.