Skip to content

cachyos-bootstrap-vm

Recipe card from the charly-vm plugin (Kinds — schema authoring).

source.kind: bootstrap VM that builds a CachyOS rootfs from scratch via pacstrap (using /charly-distros:cachyos-pacstrap-builder), then boots it under libvirt/QEMU.

The cachyos-vm entity and its check-cachyos-vm disposable test bed live in the opencharly/distro-cachyos repo (git submodule at box/cachyos), all in that repo’s unified charly.yml. The bed is a disposable: true deploy (a check bed is just a deploy carrying disposable: true — there is no separate bed kind), driven by charly check run check-cachyos-vm. Drive the VM lifecycle from the submodule: charly -C box/cachyos vm build cachyos-vm + charly -C box/cachyos vm create cachyos-vm (or charly --repo opencharly/distro-cachyos …).

VM Configuration (from box/cachyos/charly.yml)

Section titled “VM Configuration (from box/cachyos/charly.yml)”
Setting Value
Source kind: bootstrap, builder: pacstrap, builder_image: cachyos-pacstrap-builder
Distro cachyos
rootfs btrfs
Disk / RAM / CPU 25G / 4G / 2
Machine / firmware q35 / uefi-insecure
Network user mode
SSH user cachy, port_auto: true (the runner allocates a free host port at vm-create and persists it in vm_state), key_source generate

The cachyos distro config (base packages, keyring, mirrors, repos) comes from the embedded distro: cachyos build vocabulary baked into the charly binary (charly/charly.yml), merged in by the unified loader.

check-cachyos-vm is a disposable: true deploy (vm: {from: cachyos-vm, disposable: true}), so charly -C box/cachyos check run check-cachyos-vm runs the full R10 sequence unattended (the equivalent charly update check-cachyos-vm rebuild also works, since the deploy is folded into the Deploy map).

charly vm build cachyos-vm builds a bootable disk end-to-end. The vm_bootstrap.go path uses the same renderPacstrapExtraConf helper as the image path, which emits the per-repo SigLevel (required for GPGME) and an [options] Architecture = x86_64 x86_64_v3 directive (so linux-cachyos passes the architecture check).

pacstrap installs linux-cachyos (x86_64_v3), mkinitcpio generates the initramfs (its autodetect hook warns in the chroot and falls back to all-modules — non-fatal), and a bootable disk.qcow2 (~3.5 GB) + cloud-init seed.iso are written. The Docker-Hub /charly-distros:cachyos container base remains the faster path when you don’t need a VM disk.

MUST be invoked when editing cachyos-vm or its check bed, or authoring a CachyOS VM. Invoke BEFORE reading source code or launching Explore agents.