Minimal Hypervisor Host • Super Enhanced CachyOS Style • Immutable • VM Shimmed
A bare-minimum, highly tweaked, immutable hypervisor appliance built as a CachyOS PKG fork.
The host (Layer 1) runs a minimal kernel + initramfs with libvirtd as a powerful pre-boot control system. The main appliance and all workload VMs run inside a cleanly shimmed guest (Layer 2). Everything is immutable, versioned, and easy to roll back.
GitHub: https://github.com/inferrious/lammaa
- Extremely cut-down appliance
- Kernel + minimal initramfs as the hypervisor shim (Layer 1)
- Full desktop + virt stack runs inside a shimmed VM (Layer 2)
- NixOS-style rebuild workflow for major changes
- Atomic, versioned squashfs layers with easy rollback
- LUKS2 + YubiKey as the outer security shell
- One kernel binary shared between host and guest where possible
- libvirt runs in Layer 1 as the pre-boot control system (full XML-driven hardware shim)
| Layer | Content | Purpose | Size Target |
|---|---|---|---|
| Layer 1 (Hypervisor) | Custom kernel + minimal initramfs + libvirtd + dracut hook | Boots the system, unlocks LUKS, mounts layers, starts libvirtd, defines & launches appliance VM via XML | ~300-500 MB (acceptable on 3× NVMe RAID0) |
| Layer 2 (Appliance) | Minimal GNOME + virt-manager + libvirtd + your tools + app layers | Full desktop, VM management, workload VMs (nested) | ~2–4 GB |
- Limine loads kernel from Layer 1 squashfs
- Minimal initramfs runs dracut hook:
- Unlocks LUKS2 (YubiKey)
- Mounts both squashfs layers read-only
- Creates overlayfs on btrfs writable subvolumes
- Two modes (selected via kernel cmdline):
traditional→ switch_root into overlayshim→ starts minimallibvirtd, defines the appliance VM from XML (stored in Layer 2), then launches it via QEMU (virtio-gpu + SPICE)
- Guest (Layer 2) runs the full desktop + nested workload VMs (libvirt also available inside for further management)
- LUKS2 container on Btrfs (multi-device or RAID0)
- Subvolumes:
@(base),@var,@etc,@layers(your virtual-disk app layers),@vms,@snapshots
- Super Enhanced CachyOS Kernel — 1000 Hz, full
PREEMPT, BORE scheduler, stripped debug, optimized for Ryzen + NVIDIA + NVMe + KVM - Immutable by Default — Read-only squashfs bases + writable overlays only where needed
- VM Shimmed — The "real" OS runs inside QEMU for maximum isolation and clean separation
- NixOS-style Rebuilds — Update files in
build/→ one command → new dated squashfs versions. Old versions kept for instant rollback. - Powerful Pre-boot Control — libvirt + libvirtd runs in Layer 1 for full XML-driven hardware shim from the earliest stage (size acceptable on 3× NVMe RAID0)
- Matryoshka App Layers (future) — Self-extracting virtual-disk layers using your Python cat technique
- YubiKey LUKS2 — Main security layer
lammaa/
├── build/ # NixOS-style build workspace
│ ├── versions/ # Dated squashfs outputs (kept for rollback)
│ ├── hypervisor/ # mkosi profile for Layer 1
│ ├── appliance/ # mkosi profile for Layer 2
│ ├── configs/ # kernel cmdline, libvirt templates, shim config
│ └── scripts/
│ ├── build.sh # Main rebuild script
│ └── rollback.sh
├── kernel/ # Forked CachyOS linux-cachyos PKGBUILD
├── dracut/ # Custom 99dual-squashfs module
├── docs/
│ ├── BUILD.md
│ ├── SHIM.md
│ └── ROLLBACK.md
├── README.md
└── LICENSE
cd build
# Make changes (kernel config, packages, configs, etc.)
nano configs/shim.json
# or edit kernel PKGBUILD, mkosi profiles, etc.
./scripts/build.sh --layer both --version $(date +%Y-%m-%d)
# Output:
# versions/hypervisor-2026-07-06.squashfs
# versions/appliance-2026-07-06.squashfs
# Update symlinks (optional)
ln -sf versions/hypervisor-2026-07-06.squashfs current-hypervisor.squashfs
ln -sf versions/appliance-2026-07-06.squashfs current-appliance.squashfsOld versions remain in versions/ for instant rollback via Limine boot menu.
- Project structure & README
- Repo initialization on GitHub (inferrious/lammaa)
- Basic mkosi profiles for both layers
- Fork
linux-cachyos-bore - Apply 1000 Hz + full PREEMPT + aggressive stripping
- Build and test
- Minimal mkosi profile for hypervisor
- Updated
dual-squashfs.shhook (lighter, with QEMU shim launch) - Overlayfs + LUKS unlock integration
- Direct QEMU launch in initramfs with virtio-gpu + SPICE
- Simple config/JSON parser for shim parameters
- Guest kernel passed via
-kernel(same binary)
- Minimal GNOME + virt-manager + libvirtd
- Pre-configured storage pools on btrfs subvolumes
- Firstboot setup script
- Limine multi-version entries
- YubiKey LUKS2 enrollment script
- Full Btrfs subvolume layout
build.shwith versioned outputrollback.sh- Documentation
- QEMU test matrix (traditional + shim)
- Hardware deployment
- Nested KVM validation
- Security review (minimal attack surface)
- Self-extracting virtual-disk layers using your Python technique
- Trigger on VM ISO mount (optional)
- Single kernel binary used for both host and guest (passed via QEMU
-kernel) - Custom CachyOS fork with your exact 1000 Hz / PREEMPT / stripped config
- Pre-boot (Layer 1): LUKS unlock, layer mounting, overlay creation, starts minimal
libvirtd, defines & launches the appliance VM from XML (full pre-boot control system) - Guest (Layer 2): Full GNOME + desktop experience, nested workload VMs, additional libvirt management if needed
Note on libvirt in Layer 1: On 3× NVMe RAID0 the increased size (~300-500 MB) is acceptable. This gives powerful XML-driven control of the hardware shim from the earliest boot stage.
- Clone the repo
- Enter
build/and run./scripts/build.sh --layer both - Copy the two squashfs files to your target disk (inside LUKS + Btrfs)
- Configure Limine with entries for current + previous versions
- Boot and enjoy your minimal immutable shimmed hypervisor
Full instructions will be in docs/BUILD.md once Phase 6 is complete.
This is a personal research / appliance project.
Issues and pull requests are welcome if they align with the "minimal, immutable, super-enhanced Cachy, VM-shimmed" philosophy.
MIT (or your preferred license — to be decided)
Status: Early design + planning phase. Core architecture is solid. Implementation has begun with the dracut hook and build workflow.
Last Updated: 2026-07-06
Built with obsession for minimalism, performance, and clean rollback.