Skip to content

glemsom/dkvm

Repository files navigation

DKVM

Build

DKVM — Desktop KVM. A minimal hypervisor that runs entirely from RAM, enabling you to virtualize your own desktop PC with maximum performance. Tailored for power users, homelab enthusiasts, and developers who need near-native VM performance with GPU/PCI passthrough. Supports full VGA (GPU) passthrough, PCI‑e device assignment, and other hardware acceleration features, delivering near‑native speed for the guest OS.

The project builds a bootable USB image containing an Alpine Linux base, the required virtualization packages, and the DKVM Manager Golang TUI.

Features

  • GPU (VGA) Passthrough – Direct access to your graphics card for high‑performance graphics.
  • PCI‑e Device Assignment – Attach other devices such as network cards or USB controllers.
  • Minimal Overhead – Entire OS runs from RAM after boot.
  • DKVM Manager TUI – CPU pinning, PCI/USB passthrough, VM creation, and configuration via an interactive terminal UI.
  • Hugepages – Back guest memory with hugepages to reduce TLB pressure and overhead.
  • TPM (swtpm) – Virtual TPM 2.0 for guests requiring secure boot or BitLocker.
  • Bridge Networkingbr0 bridge with DHCP for seamless guest access to the LAN.
  • QMP Guest Management – QEMU Machine Protocol for scripted VM control and automation.
  • ACPI Power Management – Graceful guest shutdown, reboot, and power management via ACPI.
  • Two‑Layer Persistencelbu overlay preserves OS configuration; a dedicated DKVMDATA partition stores VM data across reboots.

Quick Start

  1. Download the latest release ZIP from Releases.
  2. Write the image to a USB stick (see First-Boot Walkthrough).
  3. Boot from USB (see First-Boot Walkthrough).
  4. Create a DKVMDATA partition: sudo mkfs.ext4 -L DKVMDATA /dev/sdXY && reboot (see Setting Up DKVMDATA).
  5. Configure CPU pinning, PCI/USB passthrough, memory, and hugepages via the DKVM Manager TUI on tty1 (see the guide).
  6. Create and start a virtual machine (see Creating a VM and Launch the VM).

Documentation

🧪 Tutorials — start here

Document What you'll do
First-Boot Walkthrough Write USB image, boot DKVM, configure storage and devices, create your first VM.

🔧 How-to Guides — solve specific problems

Document Problem it solves
Networking Set up bridge, user-mode, or port forwarding networking for guests.
Troubleshooting Diagnose DKVMDATA mounts, VM boot failures, SSH issues.
Example Scripts GPU driver cycling for AMD 9000-series, CPU pinning verification.
GPU Passthrough Configure dedicated GPU passthrough, IOMMU groups, vfio-pci binding, VBIOS, reset issues.
Configuration Files Understand the DKVMDATA partition layout and how VM configs are stored.
Backup, Restore & Migration Back up VM data, restore after failure, and migrate VMs to another host.
Document What it describes
Architecture Reference Boot sequence details, build pipeline commands, persistence specifics, component map.
Local Development Build commands, quick iteration loop, image inspection, cleanup.
CONTRIBUTING PR process, coding standards, changelog policy.
CHANGELOG Version history and release notes.

🧠 Explanation — deeper understanding

Document Topic
CONTEXT Project terminology and ubiquitous language (what "DKVM", "DKVMDATA", "Guest" mean).
Architecture Overview How DKVM works, design decisions, high-level architecture narrative.
Persistence Model How OS settings and VM data survive reboots.

Build Process

Pre-built images are available in GitHub Releases.

To build from source, see the Local Development guide


DKVM Manager

The DKVM Manager is a Golang-based TUI that provides a convenient way to configure and launch VMs — CPU pinning, PCI/USB passthrough, VM creation, hugepages, TPM support, and more.

See the First-Boot Walkthrough for a step-by-step guide. For the full feature list, see the dkvmmanager repository.


Project Repositories

Repository Purpose
glemsom/dkvm This repo. Makefile, scripts, examples, docs. Produces the bootable USB image.
glemsom/dkvmmanager Go TUI binary that runs on tty1. Separate repo, version-pinned in Makefile.
glemsom/dkvm-qemu Custom QEMU APK repository with DKVM-specific patches.

About

DKVM - Desktop KVM

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors