Skip to content

Virtual machine ​

The vm-arm64 image is a development image of Castmill OS for virtual machines. Use it to try Castmill OS, test pairing and updates, and develop without hardware.

Requirements ​

  • An Apple Silicon Mac (M1 or newer), or an arm64 Linux machine with KVM
  • qemu, zstd and the GitHub CLI (gh)
  • A clone of the castmill-os repository
sh
brew install qemu zstd gh          # macOS

QEMU runs the image with hardware virtualization (Hypervisor.framework on macOS, KVM on Linux), so it runs at close to native speed. It also provides UEFI firmware, two virtual screens and a hardware watchdog, which Castmill OS uses for its A/B boot and recovery.

Run it ​

sh
scripts/run-vm.sh fetch            # latest vm-arm64 image built from main
scripts/run-vm.sh fetch <run-id>   # ...or from a specific GitHub Actions run
scripts/run-vm.sh run              # boot it
scripts/run-vm.sh reset            # delete the VM disk: a fresh, unpaired device

run also accepts the path of a downloaded image, for example from a release:

sh
gh release download v0.1.0 -R castmill/castmill-os -p '*genericarm64*' -D .vm/download
scripts/run-vm.sh run .vm/download/castmill-os-image-genericarm64.rootfs.wic.zst

The VM disk lives in .vm/ and survives restarts, like a real device.

Options ​

VariableDefaultDescription
CASTMILL_VM_MEM4096Memory in MB
CASTMILL_VM_CPUS4Virtual CPUs
CASTMILL_VM_OUTPUTS2Number of virtual screens
CASTMILL_VM_SSH_PORT2222Host port forwarded to the VM's SSH
CASTMILL_VM_DIR.vmWhere the VM disk and UEFI variables are kept
sh
CASTMILL_VM_OUTPUTS=1 CASTMILL_VM_MEM=2048 scripts/run-vm.sh run

Development and production images ​

Development image (VM)Production images
SSHssh -p 2222 root@localhost, empty root passwordNo SSH, no root login
BannerDEVELOPMENT IMAGE on the console and status page–
[backend] in castmill.confHonored: point it at your own Castmill serverIgnored
Plain http Castmill serversAllowedOnly https, or http on loopback
Debug toolsIncluded–

What the VM is good for ​

  • boot, the A/B slots, updates and rollback
  • pairing with Castmill and the dashboard features
  • several screens, castmill.conf, factory reset
  • working on the agent and the kiosk shell

It's not good for video performance (no hardware decoding), display hotplug, or anything hardware-specific. Use a Raspberry Pi 5 or an Intel mini PC for those.

Next steps ​

Documentation licensed under CC BY 4.0. Code under MIT and Apache-2.0.