Skip to content

⚙ darkone.system.microvm

MicroVM guests (microvm.nix, cloud-hypervisor) on a DNF hypervisor host.

A guest is an ordinary DNF host of the inventory, flagged with the microvm-guest:<hypervisor> feature in etc/config.yaml. It keeps its zone IP, services and monitoring; the hypervisor runs it and deploys it.

- hostname: "space1"
zone: "cp:1.40" # fixed IP: tap + MAC are derived from it
profile: "ai-space"
features: ["microvm-guest:ms-a2", "monitoring-node"] # monitored like any host
  • Guest side (microvm/guest.nix): virtiofs shares under <stateDir>/<guest>/{persist,var-lib,home}, read-only host store, host key on /persist, static /32 link routed by the hypervisor.
  • Hypervisor side (microvm/host.nix): one routed tap per guest (no bridge), whole host on networkd with the zone gateway as static resolver, proxy ARP on the LAN, nftables isolation (dnf-microvm table), <stateDir> closed to the hypervisor’s users (0770) and bound nosuid,nodev (setuid files, device nodes of a guest inert).
  • Speech to text (microvm/whisper.nix): one whisper.cpp server on the hypervisor for the guests with darkone.system.microvm.guest.whisper (OpenClaw voice notes), started and opened for them only; whisper.model, whisper.threads tune it.
  • hypervisor nullOr str Hypervisor running this host as a microVM guest, null when bare metal.
  • stateDir str Hypervisor directory holding one sub-directory of shares per guest.
  • guest.vcpu ints.positive Guest virtual CPUs.
  • guest.mem ints.positive Guest RAM, in MiB.
  • guest.whisper bool Use the hypervisor’s whisper.cpp server (speech to text): started and opened to this guest.
  • guestInputRules lines nftables rules of the hypervisor’s dnf-microvm input chain, before the drop of guest traffic.
  • whisper.model path whisper.cpp ggml model of the hypervisor’s server, loaded once for all guests.
  • whisper.threads ints.positive Threads of the hypervisor’s whisper.cpp server, one transcription at a time.
darkone.system.microvm = {
hypervisor = dnfLib.getMicrovmHypervisor hosts host;
stateDir = "/var/lib/microvms";
guest.vcpu = 2;
guest.mem = 4096;
guest.whisper = false;
guestInputRules = "";
whisper.model = pkgs.fetchurl {
url = "https://huggingface.co/ggerganov/whisper.cpp/resolve/main/ggml-large-v3-turbo.bin";
sha256 = "1fc70f774d38eb169993ac391eea357ef47c88757ef72ee5943879b7e8e2bc69";
};
whisper.threads = 8;
};

Source: modules/system/microvm.nix 🡕