Add the qemu-guest profile to the test VM

The initrd default set covers nvme, ahci, sd_mod and USB HID, but not
virtio. Without virtio_blk and virtio_pci the initrd never sees the
disk and stops at

  timed out waiting for device /dev/disk/by-partlabel/disk-main-root

profiles/qemu-guest.nix provides them. Real hardware needs no
counterpart; nvme is in the default set.
This commit is contained in:
2026-08-11 15:01:04 +02:00
parent b3610e1285
commit 0e0c0d5b92
+8 -1
View File
@@ -1,9 +1,16 @@
# ABOUTME: Host configuration for the QEMU/KVM test VM.
# ABOUTME: Launcher script lives outside this repo at ~/VMs/moonix-vm.sh.
{ pkgs, ... }:
{ pkgs, modulesPath, ... }:
{
# virtio_blk and virtio_pci are not in boot.initrd.availableKernelModules by
# default — that list covers nvme, ahci and USB, not virtio. Without them the
# initrd never sees the disk and stops at
# "timed out waiting for device /dev/disk/by-partlabel/disk-main-root".
# Real hardware needs no counterpart to this; nvme is covered.
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
# The launcher attaches the qcow2 as if=virtio, so the guest sees /dev/vda.
# There is no by-id path for it — the disk only exists inside the VM.
# Encryption stays on: this is where the LUKS layer gets exercised before it