Get KubeVirt

KubeVirt Quickstart

This demo will deploy KubeVirt on an existing Kubernetes (1.9 or
later) or OpenShift Origin (3.9 or later) cluster. For a quick way to bring up a Kubernetes or OpenShift Origin cluster, see Minikube and Minishift.

Deploy KubeVirt

KubeVirt deploys as an add-on to a Kubernetes (1.9 or later) cluster, using the kubectl tool and the following manifest file:

Note: The initial deployment to a new cluster can take
a long time, because a number of containers have to be pulled from the
internet. Use watch kubectl get --all-namespaces pods to monitor the progress.

Deploying KubeVirt on OpenShift Origin

On OpenShift Origin, the following SCCs need to be added prior kubevirt.yaml deployment:

Install virtctl

Note: This requires kubectl from Kubernetes 1.9 or later on the client

An additional binary is provided to get quick access to the serial and graphical ports of a VM, and handle start/stop operations.
The tool is called virtctl and can be retrieved from the release page of KubeVirt:

KubeVirt with no additional storage

KubeVirt with storage environment for development and testing

KubeVirt can also be installed with a self-contained storage environment,
using Ceph and Cinder, that is geared for non-production use. To install
KubeVirt with the demo storage environment, first edit the inventory file
and populate the section named “masters”, “etcd”, and “nodes”.

# inventory# BEGIN CUSTOM SETTINGS[masters]
# Your master FQDN[etcd]
# Your etcd FQDN[nodes]
# Your nodes FQDN's[nfs]
# Your nfs server FQDN[glusterfs]
# Your glusterfs nodes FQDN# Each node should have the "glusterfs_devices" variable, which# points to the block device that will be used by gluster.## If you run openshift deployment# You can add your master as schedulable node with option openshift_schedulable=true# Add at least one node with lable to run on it router and docker containers# openshift_node_labels="{'region': 'infra','zone': 'default'}"# END CUSTOM SETTINGS

KubeVirt with GlusterFS and Heketi storage environment

To install GlusterFS and Heketi on Kubernetes, follow the setup guide in
gluster-kubernetes repo.
You will need to configure the admin key with gk-deploy and at end of the
install note the Heketi URL.

Once you have GlusterFS and Heketi installed on your Kubernetes cluster,
you can deploy KubeVirt with the storage-glusterfs role to setup a Secret
and a StorageClass to allow you to provision Persistent Volume Claims to
store your VM images.

First edit the inventory file and populate the sections “master”, “etcd”,
“nodes”, and “glusterfs”.

# inventory# BEGIN CUSTOM SETTINGS[masters]
# Your master FQDN[etcd]
# Your etcd FQDN[nodes]
# Your nodes FQDN's[nfs]
# Your nfs server FQDN[glusterfs]
# Your glusterfs nodes FQDN# Each node should have the "glusterfs_devices" variable, which# points to the block device that will be used by gluster.## If you run openshift deployment# You can add your master as schedulable node with option openshift_schedulable=true# Add at least one node with lable to run on it router and docker containers# openshift_node_labels="{'region': 'infra','zone': 'default'}"# END CUSTOM SETTINGS

Then run this playbook, substituting the namespaces and heketi_url to
match your environment: