Masterless KVM/QEMU orchestrator

Run real VMs across a cluster — from one static binary, with no master node.

Copy one binary to each Linux host. The hosts find each other and replicate state, and you get live migration, automatic failover, snapshots, deduplicated backups, and a web UI — with no external database, no agents, and no control plane to look after.

  • ~35 MB static binary
  • Linux + KVM/QEMU
  • GPL-2.0
node-1 10.0.50.11
node-2 10.0.50.12
node-3 10.0.50.13
The README demo: list three hosts, start web-01, live-migrate it to node-3.

The CLI

Start a VM, then move it while it runs.

The session from the recording above, as text. lv reaches any host through an SSH tunnel, or over gRPC with mTLS from a remote workstation.

  1. List the hosts, with the CPU and memory each one has in use and the litevirt version it runs.

    lv host ls
    NAME    ADDRESS      STATE        CPU    MEMORY            VMs  VERSION
    node-1  10.0.50.11   HOST_ACTIVE  6/64   24576/262144 MiB  2    v1.0.10
    node-2  10.0.50.12   HOST_ACTIVE  4/64   16384/262144 MiB  1    v1.0.10
    node-3  10.0.50.13   HOST_ACTIVE  0/32   0/131072 MiB      0    v1.0.10
  2. Start a VM. No host is named, so placement puts it on node-2.

    lv run --name web-01 --image ubuntu-24.04 --cpu 2 --memory 2048
    VM web-01 created on node-2 (state: VM_RUNNING)
  3. Live-migrate it to node-3. Memory copies across while the VM keeps running, then one 74 ms switchover.

    lv migrate web-01 node-3
      live-migrating web-01: node-2 → node-3
      transferring memory (2048 MiB) ▕████████████████████▏ 100%
      ✓ migrated — 1 switchover, 74ms downtime · web-01 now on node-3
  4. Check where it runs now.

    lv ls
    NAME    HOST    STATE       CPU  MEMORY    IP
    web-01  node-3  VM_RUNNING  2    2048 MiB  10.0.50.51

The web UI

The same cluster, in a browser.

The UI ships inside the binary and every host serves it, built on Go templates and HTMX. Sign in to any node and you see the whole cluster.

litevirt dashboard showing 3 of 3 hosts active, 11 of 13 VMs running, CPU and memory allocation, a host resources table for node-1 to node-3, recent VMs, and recent events
The dashboard: hosts, VMs, CPU and memory allocation, per-host resources, recent VMs, and the cluster's event stream.
Virtual machines table listing 13 VMs across node-1, node-2, and node-3 with state, CPU, memory, IP address, and stop, restart, and delete buttons
Every VM in the cluster in one table. Filter by name or host, select several, and act on all of them at once.
Detail page for VM web-01 with live CPU, memory, disk I/O, and network I/O graphs and Stop, Restart, VNC, and Terminal buttons
One VM up close: live CPU, memory, disk, and network graphs, with the console and lifecycle actions along the top.
Create VM dialog on the Basics tab with name, image, vCPU, memory, root disk size, host, and tags fields
Creating a VM needs a name and an image. Boot, cloud-init, networks, and PCI devices each have their own tab.

What's in the binary

The whole cluster stack, without the add-ons.

No separate backup server, load-balancer appliance, or identity service to install. All of this ships in the same file.

  • Compute

    • Full KVM/QEMU VMs with UEFI, cloud-init, and VNC or SPICE consoles
    • Hot-plug disks, NICs, and GPUs into running VMs
    • Virtio memory ballooning
    • Change CPU, restart policy, and autostart without rebuilding the VM
  • Networking

    • Bridges, VXLAN overlays, isolated networks, and SR-IOV
    • Built-in DHCP and DNS, with names like web.shop.lan for every VM
    • NAT, SNAT, and host isolation
  • Resilience

    • Live, cold, and storage migration
    • Quorum failover with IPMI or watchdog fencing
    • Per-VM restart policies, plus a witness host for even-sized clusters
    • Self-upgrade that rolls itself back if a host fails to come up
  • Data

    • Disk snapshots, and live snapshots that include RAM
    • Deduplicated backups that freeze the guest filesystem first
    • Incremental volume replication, promoted when a host is fenced
    • Eight storage drivers: local, dir, NFS, iSCSI, Ceph, ZFS, btrfs, LVM-thin
  • Orchestration

    • Compose-style YAML for multi-VM stacks
    • Placement policies, anti-affinity, and a live rebalancer
    • Layer-4 load balancing with HAProxy and keepalived
    • A GitOps reconcile loop, VM templates, and clones
  • Containers

    • LXC and OCI containers with the same lifecycle and Compose support as VMs
    • Deduplicated backups, snapshots, and cold migration
    • Templates, clones, and relocation when a host is lost
    • Shared tenancy quotas, audit chain, and metrics
  • Security

    • mTLS on every connection, from an automatic ECDSA P-256 PKI
    • Path-based RBAC with local, OIDC, and LDAP realms
    • TOTP and WebAuthn two-factor sign-in
    • Scoped API tokens and a tamper-evident audit hash chain
Six litevirt hosts, each connected to every other, with no central nodenode-1node-2node-3node-4node-5node-6
Six hosts, one role. Any of them can take a command.

No master node

Every host is equal.

Most clusters keep their state in one place — a database, etcd, a corosync ring — and that place becomes the thing to protect. litevirt spreads state across every host instead, so there is no master to lose, and clusters grow to hundreds of nodes.

  • Every host holds the whole cluster

    State replicates to every node, so the CLI, REST API, and web UI can talk to any of them.

  • Writes travel through relays

    The Crescent protocol fans changes out over a relay-quorum topology. There is no leader to elect.

  • Conflicts settle row by row

    The last write wins on each row's updated_at timestamp, and anti-entropy checks find and repair drift.

  • Failover waits for quorum

    A host that loses quorum is fenced over IPMI or a watchdog before its VMs restart elsewhere. A witness host breaks ties in even-sized clusters.

How it compares

Where litevirt fits.

Against the tools people usually run VMs on. Partial means it can be done, with the caveat noted.

CapabilitylitevirtProxmox VEbare libvirtk8s + KubeVirt
Single static binary — no database, no agentsYesNoNoNo
Masterless — no central control planeYesPartialcorosyncn/aNoetcd
Live migration without downtimeYesYesmanualYes
Automatic failover with fencingYesYesNoYes
Compose-style multi-VM YAMLYesNoNoPartialCRDs
Disk and live (RAM) snapshotsYesYesPartialPartial
Deduplicated backup and incremental replicationYesYesNoPartialadd-on
GPU and PCI passthrough, with hot-plugYesYesmanualYes
mTLS everywhere, RBAC, OIDC/LDAP, and 2FAYesPartialNoYes
Footprint~35 MBfull distrolibraryheavy

Install

A running VM in three steps.

On any Linux machine with KVM. Each extra host takes one more command.

Read the full guide
  1. Build the binary

    git clone https://github.com/colonelpanik/litevirt.git
    cd litevirt && make build
  2. Start a node

    sudo cp bin/litevirt /usr/local/bin/
    sudo litevirt host init --local --name node-1
    sudo systemctl enable --now litevirt.service
  3. Run a VM

    export LV_HOST=[email protected]
    lv image pull <cloud-image-url> --name ubuntu
    lv run --name my-vm --image ubuntu --cpu 2 --memory 2048