WI: Build Wayland dev VM base image (Debian Bookworm + Wayland + Sway + grim + wtype) #183

Closed
opened 2026-05-24 05:11:17 +00:00 by toasterson · 0 comments
Owner

Goal

Create a pre-built QCOW2 base image for QA testing: Debian Bookworm Slim with full Wayland development and testing toolchain.

Background

QA VMs need a ready-to-boot Wayland environment for screenshot-based GUI testing. Base image is built once, QCOW2 overlays provide ephemeral instances.

🔗 Remote Sources (all on code.aopc.cloud)

WayRay VM docs — existing VM testing reference:

vm-manager:

Design doc: Ask Tecton for memory/projects/anima-qa.md — VM image spec and VMFile template

🏗️ Implementation Guide

Step 1: Create provisioning script

Create crates/anima-qa/scripts/build-wayland-dev-image.sh based on WayRay's vm/setup.sh but for Debian Bookworm:

  • Use debootstrap to build debian:bookworm-slim
  • Install: wayland, sway, foot, grim, wtype, ydotool, mesa-utils, build-essential, rust
  • Sway config: headless-compatible, 1920x1080, Super+Return for terminal
  • Auto-login qa user, start Sway on TTY1
  • SSH server with key auth
  • Output: qcow2 at a well-known path

Step 2: Create VMFile.kdl

Create VMFile.kdl in Anima workspace root with: cloud-init for qa user, SSH config, user networking, 4 vCPUs, 4GB RAM, 20GB disk, UEFI

Step 3: Host the image

Upload the built qcow2 to Solstice MinIO or another HTTP-accessible location. vm-manager's ImageManager downloads from URLs.

Acceptance Criteria

  • Image builds successfully
  • VM boots with Sway, grim captures screenshots
  • SSH accessible
  • wtype and ydotool functional
  • #184 — visual testing (needs this image)
  • #187-189 — test suites (use this image)
## Goal Create a pre-built QCOW2 base image for QA testing: Debian Bookworm Slim with full Wayland development and testing toolchain. ## Background QA VMs need a ready-to-boot Wayland environment for screenshot-based GUI testing. Base image is built once, QCOW2 overlays provide ephemeral instances. ## 🔗 Remote Sources (all on code.aopc.cloud) **WayRay VM docs** — existing VM testing reference: - **Repo:** https://code.aopc.cloud/CloudNebulaProject/wayray - **Clone:** `git clone https://code.aopc.cloud/CloudNebulaProject/wayray.git` - https://code.aopc.cloud/CloudNebulaProject/wayray/src/branch/main/vm/README.md — UTM-based VM testing docs, explains Sway nested compositor approach, warns about virgl+EGL issues - https://code.aopc.cloud/CloudNebulaProject/wayray/src/branch/main/vm/setup.sh — existing provisioning script: package install, auto-login setup, Sway config, Rust install, WayRay build - **Pattern to follow:** setup.sh installs Wayland + Mesa + Sway + foot + build tools, configures auto-login on TTY1, starts Sway automatically **vm-manager:** - https://code.aopc.cloud/CloudNebulaProject/vm-manager/src/branch/main/crates/vm-manager/src/vmfile.rs — VMFile.kdl format - https://code.aopc.cloud/CloudNebulaProject/vm-manager/src/branch/main/VMFile.kdl — example VM spec **Design doc:** Ask Tecton for `memory/projects/anima-qa.md` — VM image spec and VMFile template ## 🏗️ Implementation Guide ### Step 1: Create provisioning script Create `crates/anima-qa/scripts/build-wayland-dev-image.sh` based on WayRay's `vm/setup.sh` but for Debian Bookworm: - Use debootstrap to build debian:bookworm-slim - Install: wayland, sway, foot, grim, wtype, ydotool, mesa-utils, build-essential, rust - Sway config: headless-compatible, 1920x1080, Super+Return for terminal - Auto-login qa user, start Sway on TTY1 - SSH server with key auth - Output: qcow2 at a well-known path ### Step 2: Create VMFile.kdl Create `VMFile.kdl` in Anima workspace root with: cloud-init for qa user, SSH config, user networking, 4 vCPUs, 4GB RAM, 20GB disk, UEFI ### Step 3: Host the image Upload the built qcow2 to Solstice MinIO or another HTTP-accessible location. vm-manager's ImageManager downloads from URLs. ## ✅ Acceptance Criteria - [ ] Image builds successfully - [ ] VM boots with Sway, grim captures screenshots - [ ] SSH accessible - [ ] wtype and ydotool functional ## Related WIs - #184 — visual testing (needs this image) - #187-189 — test suites (use this image)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
toasterson/Anima#183
No description provided.