Skip to content
Switch branches/tags

Latest commit

move vm annotations to vm section

Signed-off-by: Karel Šimon <>

Git stats


Failed to load latest commit information.
Latest commit message
Commit time
osinfo-db @ ec67d57

Build Status

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


This repository provides VM templates in the form compatible with OpenShift templates and OpenShift Cluster Console Web 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.

# 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 - windows
# - the workload type - desktop
# - the size - medium

# Use the template
$ oc process --local -f dist/templates/windows10-desktop-medium.yaml

$ oc process --local -f dist/templates/windows10-desktop-medium.yaml  --parameters
NAME                DESCRIPTION                   GENERATOR           VALUE
NAME                VM name                       expression          windows-[a-z0-9]{6}
SRC_PVC_NAME        Name of the PVC to clone                          win10
SRC_PVC_NAMESPACE   Namespace of the source PVC                       kubevirt-os-images

$ oc process --local -f dist/templates/windows10-desktop-medium.yaml | 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 32 template is also usable with Fedora 30.

Guest OS Meta-template
Microsoft Windows Server 2012 R2 windows
Microsoft Windows Server 2016 windows
Microsoft Windows Server 2019 windows
Microsoft Windows 10 windows
Fedora 33 fedora
Red Hat Enterprise Linux 6 rhel7
Red Hat Enterprise Linux 7 rhel7
Red Hat Enterprise Linux 8 rhel8
Ubuntu 20.04 LTS ubuntu
OpenSUSE Leap 15.0 opensuse
CentOS 6 centos6
CentOS 7 centos7
CentOS 8 centos8

Deprecated templates

Meta-template Replaced by
windows windows
windows server windows2k12


common-templates are distributed under the Apache License, Version 2.0.