virtdev
Per-project KVM/QEMU Arch Linux virtual machines for isolated, reproducible development with a locked-down network egress filter.
At a Glance
Self-hosted virtdev core released under the GNU AGPL v3.0 (OSI-approved license).
Engagement
Available On
Listed Nov 2026
About virtdev
virtdev is an open-source, shell-based command-line tool by matheusmoreira that gives each project its own Arch Linux KVM/QEMU virtual machine. Each VM is a thin qcow2 delta over a shared sealed base, so only divergent writes use disk space. The isolation boundary is a hardware-assisted hypervisor rather than a namespace or permission system.
What It Is
virtdev builds a base Arch Linux system once, seals it read-only, and derives expendable per-project VMs from it. Users create, start, SSH into, stop, back up, restore, and recreate those VMs with virtdev <command> subcommands. It runs on an Arch Linux host and requires a KVM-capable CPU, QEMU, OVMF, passt, nftables and related tools.
Network zones and isolation
Project VMs start fully locked in zone none, with no network beyond the user's SSH session. A host nftables egress filter, scoped to the machines' systemd slice cgroups, enforces a per-machine zone: none, wan (internet), lan (local environment only) or full. Custom zones can open specific host ports on top of a base zone. The filter is installed once with virtdev firewall apply, and virtdev start refuses to launch until it is applied unless --unfiltered is given.
Lifecycle and reproducibility
Project VMs are treated as disposable. Provision scripts automate setup, and a backup manifest lists guest paths to snapshot to the host. virtdev recreate chains backup, destroy, create, start, provision and restore on the current base. virtdev maintain updates the sealed base, virtdev upgrade rebuilds all projects on the new base, and virtdev detach converts a project to standalone images. Pre-ssh and post-ssh trigger scripts can customize SSH connections.
Architecture notes
Each VM has a system disk and a separate home disk, so the OS can be replaced without touching project work. VMs run as transient systemd user services, and mutating commands take an exclusive flock. The software is licensed under AGPL-3.0.
Community Discussions
Be the first to start a conversation about virtdev
Share your experience with virtdev, ask questions, or help others learn from your insights.
Pricing
Open Source
Self-hosted virtdev core released under the GNU AGPL v3.0 (OSI-approved license).
- Licensed under GNU Affero General Public License v3.0
- Per-project KVM/QEMU virtual machines
- Network zones: none, wan, lan, full, and custom zones
- Self-hosted on Arch Linux
Capabilities
Key Features
- Per-project Arch Linux KVM/QEMU virtual machines
- Thin qcow2 delta disks over a shared sealed base
- Network zones: none, wan, lan, full
- Custom zones opening specific host ports
- Host nftables egress filter
- Backup and restore via manifest
- Provision scripts and recreate workflow
- Base maintenance and one-command upgrade
- Detach projects into standalone images
- Pre-ssh and post-ssh triggers
- Hardened SSH config assembly excluding user's ~/.ssh/config
- Serial console and QEMU monitor access
- rsync-based file transfer
