VM-Operator/webpages/index.md

68 lines
2.8 KiB
Markdown
Raw Permalink Normal View History

2024-06-20 20:41:33 +02:00
---
2025-03-09 17:07:08 +01:00
title: "VM-Operator: Easy to use kubernetes operator for QEM/KVM VMs"
2025-02-23 11:47:13 +01:00
description: >-
A solution for running VMs on Kubernetes with a web interface for
admins and users. Focuses on running QEMU/KVM virtual machines and
using SPICE as display protocol.
2024-06-20 20:41:33 +02:00
layout: vm-operator
---
# Welcome to VM-Operator
2024-07-09 11:21:14 +02:00
![Overview picture](index-pic.svg)
2025-03-21 09:18:38 +01:00
This project provides an easy to use and flexible solution for
running QEMU/KVM based virtual machines (VMs) in Kubernetes pods.
2024-06-20 20:41:33 +02:00
2025-03-07 13:26:31 +01:00
The image used for the VM pods combines QEMU and a control program
for starting and managing the QEMU process. This application is called
2024-06-24 11:18:35 +02:00
"[the runner](runner.html)".
2024-06-20 20:41:33 +02:00
2025-01-30 22:17:35 +01:00
While you can deploy a runner manually (or with the help of some
2024-06-24 11:18:35 +02:00
helm templates), the preferred way is to deploy "[the manager](manager.html)"
2025-01-30 22:17:35 +01:00
application which acts as a Kubernetes operator for runners
2024-06-20 20:41:33 +02:00
and thus the VMs.
If you just want to try out things, you can skip the remainder of this
2024-06-24 11:18:35 +02:00
page and proceed to "[the manager](manager.html)".
2024-06-20 20:41:33 +02:00
## Motivation
2025-03-06 14:40:50 +01:00
2024-06-20 20:41:33 +02:00
The project was triggered by a remark in the discussion about RedHat
2025-01-30 22:17:35 +01:00
[dropping SPICE support](https://bugzilla.redhat.com/show_bug.cgi?id=2030592)
2025-03-07 13:26:31 +01:00
from the RHEL packages. Which means that you have to run QEMU in a
2024-06-20 20:41:33 +02:00
container on RHEL and derivatives if you want to continue using Spice.
So KubeVirt comes to mind. But
2025-01-30 22:17:35 +01:00
[one comment](https://bugzilla.redhat.com/show_bug.cgi?id=2030592#c4)
2024-06-20 20:41:33 +02:00
mentioned that the [KubeVirt](https://kubevirt.io/) project isn't
interested in supporting SPICE either.
Time to have a look at alternatives. Libvirt has become a common
2025-03-07 13:26:31 +01:00
tool to configure and run QEMU. But some of its functionality, notably
2024-06-20 20:41:33 +02:00
the management of storage for the VMs and networking is already provided
by Kubernetes. Therefore this project takes a fresh approach of
2025-03-07 13:26:31 +01:00
running QEMU in a pod using a simple, lightweight manager called "runner".
2024-06-20 20:41:33 +02:00
Providing resources to the VM is left to Kubernetes mechanisms as
much as possible.
## VMs and Pods
VMs are not the typical workload managed by Kubernetes. You can neither
2025-01-30 22:17:35 +01:00
have replicas nor can the containers simply be restarted without a major
2024-06-20 20:41:33 +02:00
impact on the "application". So there are many features for managing
2025-03-07 13:26:31 +01:00
pods that we cannot make use of. QEMU in its container can only be
2024-06-20 20:41:33 +02:00
deployed as a pod or using a stateful set with replica 1, which is rather
close to simply deploying the pod (you get the restart and some PVC
management "for free").
A second look, however, reveals that Kubernetes has more to offer.
2025-03-06 14:40:50 +01:00
* It has a well defined API for managing resources.
* It provides access to different kinds of managed storage for the VMs.
2025-03-09 15:52:35 +01:00
* Its managing features *are* useful for running the component that
manages the pods with the VMs.
2024-06-20 20:41:33 +02:00
2025-01-30 22:17:35 +01:00
And if you use Kubernetes anyway, well then the VMs within Kubernetes
2024-06-20 20:41:33 +02:00
provide you with a unified view of all (or most of) your workloads,
which simplifies the maintenance of your platform.