Skip to main content
XenonStack

Observability

XenonStack Insights Kubernetes Virtualization: KubeVirt vs Virtlet Guide

and | Published | Updated

KubeVirt vs Virtlet: running VMs beside containers on Kubernetes, shown as a stack from cluster nodes up to one control plane.

Key takeaway

  • Kubernetes virtualization explained: how KubeVirt and Virtlet run VMs beside containers, what live migration needs, and which project is maintained.

Kubernetes virtualization means running virtual machines (VMs) on a Kubernetes cluster next to containers, so one control plane schedules both. Two open source projects do this in different ways. KubeVirt adds VM types to the Kubernetes API as custom resource definitions and runs each VM inside a pod. Virtlet is a CRI implementation that lets the kubelet start VMs as if they were container pods. For new work, KubeVirt is the better-supported choice; Virtlet is worth understanding mainly if you already run it.

The case for either is simple: some workloads, such as databases that need kernel tuning or legacy Windows applications, are hard to containerise, and a separate VM estate means a second set of tools and operations. This guide compares the two designs, shows what to check before you adopt one, and covers the trade-offs. For background on the cluster itself, see our guide to Kubernetes architecture.

What is Kubernetes virtualization and why does it matter?

Kubernetes virtualization lets teams keep VM-based applications while moving the platform to Kubernetes. A team can then use the same scheduling, networking, storage and access control for containers and VMs. This suits organisations that run microservices on Kubernetes but still depend on applications that must stay in a VM, and it avoids running a second platform only for those workloads. It is a bridge for mixed estates rather than a reason to avoid containerising where containers fit; our guide to container design patterns for Kubernetes covers the container side.

How do KubeVirt and Virtlet work?

The two projects use different extension points in Kubernetes. The table summarises what each project states about itself.

Two-column diagram: KubeVirt custom resources, virt-controller, virt-handler and VM in a pod, compared with Virtlet CRI implementation, VM defined as a pod, QCOW2 images and KVM or QEMU.
AspectKubeVirtVirtlet
What it isA virtual machine management add-on for Kubernetes that adds VM resource types through custom resource definitions (per its GitHub README)A Kubernetes CRI implementation for running VM workloads (per its GitHub description)
How a VM runsEach VirtualMachineInstance runs as a KubeVirt-managed pod; virt-controller handles scheduling and virt-handler, with the kubelet, launches it (per its user guide)The VM is defined as a pod and started through the CRI instead of a container runtime (per its README)
VM imagesContainer disks, PersistentVolumeClaims and cloud-init disks appear in the user guide examplesQCOW2 images (per its README)
HypervisorHardware virtualization recommended; software emulation can be enabled for test clusters (per the installation guide)KVM when available, plain QEMU as a fallback (per its README)
LicenceApache License 2.0 (per its README)Confirm on the official page

In KubeVirt, the custom resources are VirtualMachine (a stateful object that can be stopped and started while keeping its data), VirtualMachineInstance (the ephemeral running instance) and VirtualMachineInstanceReplicaSet (a group of instances created from a template). In Virtlet, the Container Runtime Interface (CRI) is the plugin interface through which the kubelet talks to a runtime, so a VM can be declared with ordinary pod objects and managed with kubectl.

Which one is still maintained?

This is the main decision point. KubeVirt is listed by the CNCF as a Graduated project: accepted on 6 September 2019, Incubating from 19 April 2022 and Graduated on 4 November 2026 (per the CNCF project page). The Virtlet repository was not archived when we read it, but the last code push shown by the GitHub API was on 18 April 2020, so treat it as dormant and confirm its status on the repository before depending on it.

SituationBetter fitWhy
New VM-on-Kubernetes platformKubeVirtActive, graduated CNCF project with an operator-based install
Existing Virtlet clustersPlan a move; check the repositoryLast code push was in April 2020
Need VM live migrationKubeVirtDocumented in its user guide (see below)
Test or lab cluster without hardware virtualizationEither, with emulationKubeVirt has a useEmulation setting; Virtlet can fall back to QEMU, both slower

What has changed since early comparisons?

Early comparisons of the two projects listed KubeVirt as lacking features such as VM migration and called it alpha. That no longer holds for migration. The KubeVirt live migration guide describes moving a running VM to another node with the guest still running, using a pre-copy strategy by default and an optional post-copy mode. Treat older feature tables, including ones that compare readiness probes, SR-IOV or taints, as out of date and check the current user guide for any feature you rely on.

How does KubeVirt live migration work and what does it need?

According to the KubeVirt guide, a migration is started by creating a VirtualMachineInstanceMigration object or running virtctl migrate. Key requirements from the guide:

  • VMs that use a PersistentVolumeClaim need shared ReadWriteMany (RWX) storage.
  • Bridge binding on the pod network is not allowed.
  • The primary pod network interface must have the same name on the source and target pods.
  • Default cluster limits include 5 parallel migrations per cluster and 2 outbound migrations per node.

Plan storage and networking for these rules before promising migration to application owners.

How do you adopt KubeVirt on a cluster?

According to the KubeVirt installation guide, the cluster must be based on one of the latest three Kubernetes releases available when the KubeVirt release was made, and the kube-apiserver needs --allow-privileged=true. Hardware virtualization is recommended and can be checked with virt-host-validate qemu. KubeVirt is installed with its operator: apply the operator manifest, then the KubeVirt custom resource, and wait for the Available condition. Software emulation (useEmulation) exists for hosts without hardware support but is slower. Our guides to Kubernetes operators and Helm explain the packaging patterns involved.

  1. Pick one VM workload that cannot be containerised yet and has a clear owner.
  2. Check nodes for hardware virtualization and plan RWX storage if you need migration.
  3. Install the operator on a non-production cluster and run the workload there.
  4. Test start, stop, restart and migration, and record the failure modes.
  5. Move to production with the same policies you apply to pods.

What are the governance, security and cost trade-offs?

A VM in a pod still needs the controls you apply to other workloads: network policy, access control, image provenance and patching of the guest operating system, which Kubernetes does not do for you. Running VMs adds node capacity and operational skills, so compare the cost with keeping a separate hypervisor estate. Our guides to Kubernetes security automation and virtualization in DevOps cover the wider picture. Where AI agents help operate this platform, ElixirData Context OS keeps governed context, versioned policy and decision traces in one decision layer above AI agents, and ElixirClaw is an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.

When should you not run VMs on Kubernetes?

  • When the workload can be containerised with reasonable effort, because a container is lighter than a VM.
  • When your team has no capacity to learn KubeVirt operations and storage and network rules.
  • When you depend on a project that no longer shows recent development.

To map one VM or workload decision your agents and platform team should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

FAQ

What is the difference between KubeVirt and Virtlet?

KubeVirt adds VM resource types to Kubernetes through custom resource definitions and runs each VM in a pod. Virtlet is a CRI implementation that runs VMs as pods through the kubelet.

Is Virtlet still maintained?

The repository was not archived when we read it, but its last code push shown by the GitHub API was on 18 April 2020. Confirm its status on the repository.

Does KubeVirt support live migration?

Yes. Its user guide describes live migration of a running VM, with RWX storage required for PersistentVolumeClaim-backed VMs.

Do I need hardware virtualization?

KubeVirt recommends it. Software emulation can be enabled through useEmulation but is slower.

Can KubeVirt replace a hypervisor estate?

It can run VM workloads on Kubernetes, but check each feature you rely on in the current user guide and plan guest patching, storage and networking.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue