oVirt Blog

oVirt and OKD

This is a series of posts to demonstrate how to install OKD 3.11 on oVirt and what you can do with it. Part I - How to intall OKD 3.11 on oVirt

How to intall OKD 3.11 on ovirt (4.2 and up)

Installing OKD or Kubernetes on oVirt has many advantages, and it's also gotten a lot easier these days. Admins and users who want to take container platform management for a spin, on oVirt, will be encouraged by this.
Few of the advantages are:

  • Virtualizing the control plane for Kubernetes - provide HA/backup/affinity capabilities to the controllers and allowing hardware maintenance cycles
  • Providing persistent volume for containers via the IAAS, without the need for additional storage array dedicated to Kubernetes
  • Allowing a quick method to build up/tear down Kubernetes clusters, providing hard tenency model via VMs between clusters.

The installation uses openshift-ansible and, specifically the openshift_ovirt ansible-role. The integration between OpenShift and oVirt is tighter, and provides storage integration. If you need persistent volumes for your containers you can get that directly from oVirt using ovirt-volume-provisioner and ovirt-flexvolume-driver.
For the sake of simplicity, this example will cover an all-in-one OpenShift cluster, on a single VM.
On top of that, in the 2nd post, we will run a classic web stack, a Java application with a simple REST-API endpoint + Postgres. Postgres will get a persistent volume from oVirt using its flexvolume driver.

Picture by Soroush golpoor on Unsplash

Single shell file installation

Dropping to shell - this install.sh is a wrapper for installing the ovirt-openshift-installer container, it uses ansible-playbook and has two main playbooks: install_okd.yaml and install_extensions.yaml. The latter is mainly for installing ovirt storage plugins.

The install.sh script has one dependency, it needs to have 'podman' installed on the host, while all the rest runs inside a container.

The only dependency (except from running oVirt datacenter) is podman:

[bastion ~]# dnf install podman

For other ways to install podman consult the readme

If you can't install podman docker will be fine as well, just edit the install.sh, and substitute podman for docker.

Get the install.sh and customize

[bastion ~]# curl -O "https://raw.githubusercontent.com/oVirt/ovirt-openshift-extensions/master/automation/ci/{install.sh,vars.yaml}"

Edit the vars.yaml:

  • Put the engine details in engine_url
    engine_url: https://ovirt-engine-fqdn/ovirt-engine/api
  • Choose the oVirt cluster and data domain you want, if you don't want 'Default'
    openshift_ovirt_cluster: yours
    openshift_ovirt_data_store: yours
  • Unmark to disable the memory and disks checks in case the VM memory is under 8Gb
    openshift_disable_check: memory_availability,disk_availability,docker_image_availability
  • Domain name of the setup. The setup will create a VM with the name master0.$public_hosted_zone here. This VM will be used for all the components of the setup
    public_hosted_zone: example.com

For a more complete list of customizations, take a look at the vars.yaml and the inventory file.


Run install.sh to start the installation.

[bastion ~]# bash install.sh

install.sh automates the following steps:

  1. Pull the ovirt-openshift-installer container and run it.
  2. Download Centos Cloud Image and import it into oVirt based on the qcow_url variable.
  3. Create a VM named master0.example.com from the template above.The VM name is based on the public_hosted_zone variable.
  4. The cloud-init script will configure repositories, a network, ovirt-guest-agent, etc. based on the cloud_init_script_master variable.
  5. The VM will dynamically be inserted into an ansible inventory, under master, compute, and etc groups
  6. Openshift-ansible main playbooks are executed to install OKD: prerequisite.yml and deploy_cluster.yml

When the script finishes, an all-in-one cluster is installed and running. Let's check it out.

[root@master0 ~]# oc get nodes
NAME                         STATUS    ROLES                  AGE       VERSION
master0.example.com   Ready     compute,infra,master   1h        v1.11.0+d4cacc0

Check oVirt's extensions

[root@master0 ~]# oc get deploy/ovirt-volume-provisioner
ovirt-volume-provisioner   1         1         1            1           57m

[root@master0 ~]# oc get ds/ovirt-flexvolume-driver
ovirt-flexvolume-driver   1         1         1         1            1           <none>          59m

Default Storage Class

To run all the dynamic storage provisioning through ovirt's provisioner, we need to set oVirt's storage class to the default.
Notice that a storage class defines which oVirt storage domain will
be used to provision the disks. Also it will set the disk type (thin/thick) provision to be the default, thin.

[root@master ~]# oc patch sc/ovirt \ 
                    -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'

Connect to OKD web console

You can now connect to the web console, and keep manage your cluster from there. To do so
first make sure you can resolve master0.example.com (substitute example.com with whatever
is set in public_hosted_zone customization variable, as mentioned above.)

Browse to https://master0.example.com:8443 and login with whatever user/password you want:


This blog post covered the installation of OKD on an oVirt VM. If you followed the step you now have
an all-in-one cluster with dynamic storage provisioning from oVirt storage. In the next post I'm going deploy Postgres DB in a container with persistent volume from oVirt storage domain.

View article »

oVirt SAML with keyloak using 389ds user federation

In this post I will introduce how simple it is to integrate SAML with oVirt using Keycloak and LDAP user federation.

Prerequisites: I assume you have already setup the 389ds directory server, but the solution is very similar for any other LDAP provider. As SAML is not integrated into oVirt directly, we use Apache to do the SAML authentication for us. The mod_auth_mellon module nicely covers all needed functionality.

Read More »

Skydive With oVirt

Skydive network is an open source real-time network topology and protocols analyzer providing a comprehensive way of understanding what is happening in your network infrastructure. The common use cases will be, troubleshooting, monitoring, SDN integration and much more. It has features such as:

  • Topology capturing - Captures network topology, interface, bridge and more
  • Flow capture - Distributed probe, L2-L4 classifier, GRE, VXLAN, GENEVE, MPLS/GRE, MPLS/UDP tunnelling support
  • Extendable - Support for external SDN Controllers or container based infrastructure, OpenStack. Supports extensions through API

Benefit to oVirt users

Skydive allows oVirt administrators to see the network configuration and topology of their oVirt cluster. Administrators can capture traffic from VM1 to VM2 or monitor the traffic between VMs or hosts. Skydive can generate traffic between 2 running VMs on different hosts and then analyze. Administrators can create alerts in Skydive UI to notify when traffic is disconnected or down.

Read More »

Your Container Volumes Served By oVirt

Note: < 5 minutes read

When running a virtualization workload on oVirt, a VM disk is 'natively' a disk somewhere on your network-storage.
Entering containers world, on Kubernetes(k8s) or OpenShift, there are many options specifically because the workload can be totally stateless, i.e they are stored on a host supplied disk and can be removed when the container is terminated. The more interesting case is stateful workloads i.e apps that persist data (think DBs, web servers/services, etc). k8s/OpenShift designed an API to dynamically provision the container storage (volume in k8s terminology).

See the resources section for more details.

In this post I want to cover how oVirt can provide volumes for containers running on k8s/OpenShift cluster.

Read More »

Up and Running with oVirt 4.2 and Gluster Storage

In December, the oVirt Project shipped version 4.2 of its open source virtualization management system. With a new release comes an update to this howto for running oVirt together with Gluster storage using a trio of servers to provide for the system's virtualization and storage needs, in a configuration that allows you to take one of the three hosts down at a time without disrupting your running VMs.

If you're looking instead for a simpler, single-machine option for trying out oVirt, your best bet is the oVirt Live ISO page. This is a LiveCD image that you can burn onto a blank CD or copy onto a USB stick to boot from and run oVirt. This is probably the fastest way to get up and running, but once you're up, this is definitely a low-performance option, and not suitable for extended use or expansion.

Read on to learn about my favorite way of running oVirt.

Read More »

oVirt 4.2 Is Now Generally Available

We are delighted to announce the general availability of oVirt 4.2, as of December 19, 2017, for Red Hat Enterprise Linux 7.4, CentOS Linux 7.4, or similar.

oVirt 4.2 is an altogether more powerful and flexible open source virtualization solution. The release is a major milestone for the project, encompassing over 1000 individual changes and a wide range of enhancements spanning storage, network, engine, user interface, and analytics.

Read More »