Skip to content
Templates for running VMs on KubeVirt
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
automation removed generic workload Mar 11, 2019
ci @ f24da70 update kubevirt version Jan 11, 2019
lookup_plugins Add temporary entry for CentOS 8 Mar 6, 2019
osinfo-db @ 29feb13 Update osinfo db and add RHEL 7.6 to templates Dec 12, 2018
osinfo-db-override/os/ Add temporary entry for CentOS 8 Mar 6, 2019
templates Change label suffix to Mar 29, 2019
.gitmodules add windows template test Nov 13, 2018
.travis.yml removed generic workload Mar 11, 2019 removed generic workload Mar 11, 2019 Add PVC to launch VMs from Sep 3, 2018
generate-templates.yaml removed generic workload Mar 11, 2019
makefile removed generic workload Mar 11, 2019
stdci.yaml add windows template test Nov 13, 2018 ci: Use traviskube Sep 19, 2018

Build Status

A set of (meta-)Templates to create KubeVirt VMs.


This repository provides VM templates in the form compatible with OpenShift templates and kubevirt UI and those can further be transformed into regular objects for use with plain Kubernetes.

The VM templates are generated from meta-templates via Ansible and libosinfo. The generated templates are parametrized according to three aspects: the guest OS, the workload type and the size. The generated content is stored in dist/.

The Ansible playbook generate-templates.yaml describes all combinations that should be generated.

Every template consists of a VirtualMachine definition which can be used to launch the guest, if a disk image is available (see below).


Is it necessary to install the following components to be able to run the Ansible generator and the CI suite:

  • jq
  • ansible >= 2.4
  • libosinfo
  • python-gobject
  • osinfo-db-tools
  • intltool


By default the process below takes a generated template and converts it to an VM object that can be used to start a virtual machine. The conversion fails if a parameter (like the PVC name) is required, but not provided (i.e.PVCNAME).

# Clone the repository
$ git clone
$ cd common-templates

# Pull all submodules
$ git submodule init
$ git submodule update

# Build osinfo database
$ make -C osinfo-db

# Generate the template matrix
$ ansible-playbook generate-templates.yaml

# Pick a template by selecting
# - the guest OS - win2k12r2
# - the workload type - desktop
# - the size - medium

# Use the template
$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml
The Template "win2k1r2-desktop-medium" is invalid: template.parameters[1]: Required value:
template.parameters[1]: parameter PVCNAME is required and must be specified

$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml  --parameters
NAME      DESCRIPTION                           GENERATOR   VALUE
NAME      Name of the new VM                    expression  windows2012r2-[a-z0-9]{6}
PVCNAME   Name of the PVC with the disk image

$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml PVCNAME=mydisk

$ oc process --local -f dist/templates/win2k1r2-desktop-medium.dist.yaml PVCNAME=mydisk | kubectl apply -f - created



The table below lists the guest operating systems that are covered by the templates. The meta-templates are not directly consumable, please use the generator to prepare the properly parametrized templates first.

Note: The templates are tuned for a specific guest version, but is often usable with different versions as well, i.e. the Fedora 28 template is also usable with Fedora 27 or 26.

Guest OS Meta-template
Microsoft Windows Server 2012 R2 (no CI) win2k12r2
Fedora 28 fedora
Red Hat Enterprise Linux 7.5 rhel7
Ubuntu 18.04 LTS ubuntu
OpenSUSE Leap 15.0 (no CI) opensuse
Cent OS 7 centos7
You can’t perform that action at this time.