QEMU/KVM VMs

Run CPU-compatible Ubuntu and Windows tasks as complete QEMU/KVM guest machines on a local Linux host. ALE creates one disposable VM per run unit.

Supported, CPU-only
Use configs/environments/qemu.yaml with selected_tasks/cpu.txt for 119 selected CPU tasks. GPU passthrough is outside the current provider scope.

Butterfly animation accepts any software and uses 8 vCPU / 32 GiB. Skeletal animation uses CPU rendering with 16 vCPU / 64 GiB; its complete evaluator also passed on 8 vCPU / 32 GiB in under 11 minutes. The three remaining GPU tasks depend on the current CUDA renderer, Resolve compute backend, or Isaac setup. More CPU or RAM does not remove those software/device requirements.

Architecture and naming

ALE host process └── provider: qemu └── Docker container: agentslastexam/ale-qemu └── QEMU/KVM guest: Ubuntu or Windows └── task, applications, agent, and CUA server

The task sandbox is the guest VM, not the outer Docker container. Docker packages the ALE QEMU runner and supervises its networking, noVNC, and process lifecycle. The runner is derived from the CUA and Dockur QEMU stack. The user-facing name is therefore QEMU/KVM VMs, while the stable configuration identifier is provider: qemu. A future VMware implementation would be documented as a separate sibling provider.

Host requirements

Install and verify the host evaluation environment from the repository root:

bash env/install_host_deps.sh
uv sync --all-packages --locked
bash env/verify_host_env.sh

These dependencies run outside the guest, including for Windows tasks. See host setup for supported distributions and validation scope. Docker and KVM must also be available:

docker info
test -r /dev/kvm && test -w /dev/kvm
mkdir -p ~/.cache/ale/qemu
readlink -f ~/.cache/ale/qemu
findmnt -T ~/.cache/ale/qemu
df -h ~/.cache/ale/qemu
free -h
docker ps --format 'table {{.Names}}\t{{.Status}}'
ps -eo pid,comm,args | rg '[q]emu-system'

If ALE itself runs inside a cloud VM, that host must expose nested virtualization. Check the actual qemu.root filesystem if you override the default above. The provider fails before provisioning when Docker or /dev/kvm is unavailable.

Understand the two downloads

  1. Runner image. Docker pulls agentslastexam/ale-qemu:0.2.0 from Docker Hub when it is missing. It contains QEMU and runner infrastructure, not a guest OS.
  2. Guest disk. The host provider downloads the selected Ubuntu or Windows qcow2 from the ALE qcow2 dataset and reconstructs multipart disks when necessary.

Base disks are cached under ~/.cache/ale/qemu/images. Each run creates a small qcow2 overlay under ~/.cache/ale/qemu/runtime/slots. The overlay grows only as the guest writes changed blocks and is removed with cleanup_mode: delete.

Use the v1.1 Linux and Windows disks with the frozen task source and matching data. Retain the immutable image_revision in each snapshot of the shipped profile; see release pins.

Hugging Face data packages cover the 122 selected tasks. To run legacy disks with v1 code and fresh logs, use the original v1 guide.

Disk sources

The shipped profile uses logical Hugging Face paths. A snapshot can instead use a GCS object or an existing host file:

qemu:
  disk_source: hf://agents-last-exam/ale-images-qcow2/ale-win10-v1.1.qcow2
  # Retain image_revision from configs/environments/qemu.yaml.
  # For GCS/local sources, remove image_revision:
  # gs://ale-data-public/images/ale-win10-v1.1.qcow2
  # /absolute/path/to/ale-win10-v1.1.qcow2
  root: ~/.cache/ale/qemu
  runner_image: agentslastexam/ale-qemu:0.2.0
  runner_pull_policy: missing

GCS disk downloads require gcloud or gsutil on the host. The provider records source metadata and refreshes a cached disk when the remote object generation changes.

Run the demo tasks

Create an experiment in the repository root:

name: local_vm_demo
secret_file: secret/.env
agents:
  - configs/agents/claude_code.yaml
environment: configs/environments/qemu.yaml
tasks: selected_tasks/hello_both.txt
output:
  root: .logs/ale
concurrency: 1
wall_time_s: 1800
cleanup_mode: delete
uv run python -m ale_run run local_vm_demo.yaml --dry-run
uv run python -m ale_run run local_vm_demo.yaml

demo/hello boots Ubuntu and demo/hello_win boots Windows. Both produce and grade an output file, exercising provisioning, agent execution, evaluation, run recording, and cleanup. Bulk task output is not collected with the default output_path: null.

Task coverage

cpu.txt contains 119 CPU tasks: all 86 cpu-free-ubuntu tasks and 33 cpu-free Windows tasks. QEMU supports only CPU tasks. Run the three Windows GPU tasks in selected_tasks/gpu.txt with configs/environments/environment_gcloud.yaml.

Resource sizing and concurrency

Each guest normally derives its vCPU and memory shape from the task card's GCE machineType. The schema also accepts explicit vm.vcpus and vm.memory_gb values. Per-snapshot qemu.vcpus and qemu.memory_gb can override either source.

ALE does not reserve host resources globally. Start with low concurrency, then monitor available memory, disk latency, and overlay growth. A vCPU allocation is a guest limit, not guaranteed constant utilization, but guest memory allocations still determine the host's worst-case pressure.

Output options

Keep the default output_path: null for benchmark runs. Metadata, trajectories, evaluations, and telemetry are still collected. Set cleanup_mode: keep to inspect task files in the guest; preserve needed evidence, then stop or delete the retained VM.

With output_path: local, each guest copies its output through a per-run Samba share into the host run directory. CUA remains a fallback, not the normal bulk-transfer path.

With a gs:// output path, configure gcs_sa_key. ALE injects the key into the guest and the guest uploads directly with gsutil. See Choose where task output goes.

Current limits

Maintainer reference
Runner construction, cache validation, multipart disk assembly, overlay lifecycle, and cleanup internals are documented in docs/local-qemu.md.