unbounded-agent-qemu-vm-e2e
Skill46 starsChanged 10 days agoApache-2.0View on GitHub
Use this skill to perform unbounded-agent E2E run with qemu VM from local dev env.
In this repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- cmd/inventory/AGENTS.mdAGENTS.md
- cmd/orca/AGENTS.mdAGENTS.md
- internal/AGENTS.mdAGENTS.md
- internal/helpers/AGENTS.mdAGENTS.md
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use qemu based VM to verify the unbounded-agent node bootstrap/run flows.
- Very specific: line 13
When you need to perform unbounded-agent E2E run for changes under cmd/agent
- Very specific: line 36
If sudo is required on the host, prompt user with the command to run.
- Distinctive: line 132
After a bootstrap run, use the log analyzer to get a phase duration breakdown:
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Purpose
Use qemu based VM to verify the unbounded-agent node bootstrap/run flows.
This skill is back by hack/agent/qemu. Refer to that folder for detailed usages.
When to use
- When you need to perform unbounded-agent E2E run for changes under
cmd/agent
Steps
Start VM and Obtain VM IP
# Start the VM (requires sudo on macOS for vmnet-shared networking)
./hack/agent/qemu/vm.sh start
# On macOS the VM gets a real IP via DHCP; it is printed at the end of
# the start output and persisted to .vm/agent-vm.ip:
VM_IP=$(cat .vm/agent-vm.ip)
# On Linux the VM is reachable at localhost on the forwarded SSH port (default 2222):
# ssh -o StrictHostKeyChecking=no -p 2222 ubuntu@localhostNotes:
- Sometime the VM might be running already, check before running. If the user wants to start from fresh, stop and clean the artifacts beforehand (see below).
- If
sudois required on the host, prompt user with the command to run.
Stop VM
# Graceful stop
./hack/agent/qemu/vm.sh stop
# Force stop and remove all artifacts (.vm/ disk, ISO, logs, etc.)
./hack/agent/qemu/vm.sh stop --force --cleanGather Cluster Configuration
The agent requires a JSON config file to join a cluster. For AKS clusters, use the bundled helper script to extract the config from a kubeconfig:
# Write agent config JSON to unbounded-agent-config-dev.json at repo root
./hack/agent/.agents/skills/unbounded-agent-qemu-vm-e2e/scripts/aks-config.sh <kubeconfig> [machine-name]
# Example:
./hack/agent/.agents/skills/unbounded-agent-qemu-vm-e2e/scripts/aks-config.sh ~/.kube/my-aks-configThe script writes a JSON file matching the AgentConfig schema (see internal/provision/agent_config.go):
{
"MachineName": "agent-vm",
"Cluster": {
"CaCertBase64": "...",
"ClusterDNS": "10.0.0.10",
"Version": "v1.34.3"
},
"Kubelet": {
"ApiServer": "https://...",
"BootstrapToken": "<id>.<secret>",
"Labels": {
"kubernetes.azure.com/managed": "false"
}
}
}Notes:
- The script uses the first valid bootstrap token it finds with
usage-bootstrap-authentication=true. - For non-AKS clusters, write
unbounded-agent-config-dev.jsonat the repo root manually.
Perform Node Start
# 1. Build the agent binary targeting Linux (the VM is always Linux)
GOOS=linux GOARCH=$(uname -m) go build -o bin/unbounded-agent ./cmd/agent # change GOARCH to match the vm arch
# 2. Get the cluster config (for AKS clusters)
./hack/agent/.agents/skills/unbounded-agent-qemu-vm-e2e/scripts/aks-config.sh <kubeconfig>
# 3. Run the agent inside the VM via SSH (the repo is mounted at /agent via virtio-9p,
# so the freshly-built binary and config file are already available).
# On Linux, VM_IP is localhost and add -p 2222.
# See below examples for commands to run in different scenarios.
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${VM_IP} \
"sudo UNBOUNDED_AGENT_CONFIG_FILE=/agent/unbounded-agent-config-dev.json /agent/bin/unbounded-agent start"A successful node join should result in seeing the node registered in the target k8s cluster.
Notes:
- Inside the VM, you have root permission.
- The repo is mounted at
/agentinside the VM — both the binary and config file are available without scp. - Prompt and confirm with user for the kubeconfig / target cluster to connect before running.
- Refer to
internal/provision/assets/unbounded-agent-install.shfor other options. - The node showing with
NotReadystate is fine as long as kubelet / containerd logs are looking correctly.
Example Commands
Join to an AKS cluster with debug log level:
./hack/agent/.agents/skills/unbounded-agent-qemu-vm-e2e/scripts/aks-config.sh /path/to/kubeconfig
ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null ubuntu@${VM_IP} \
"sudo UNBOUNDED_AGENT_CONFIG_FILE=/agent/unbounded-agent-config-dev.json /agent/bin/unbounded-agent start --debug"Capture logs to a file for later analysis (recommended):
ssh ... "sudo ... /agent/bin/unbounded-agent start --debug" 2>&1 | tee .vm/agent-bootstrap.logAnalyze Bootstrap Logs
After a bootstrap run, use the log analyzer to get a phase duration breakdown:
# Table output (default)
./hack/agent/.agents/skills/unbounded-agent-qemu-vm-e2e/scripts/analyze-bootstrap-log.py .vm/agent-bootstrap.log
# JSON output
./hack/agent/.agents/skills/unbounded-agent-qemu-vm-e2e/scripts/analyze-bootstrap-log.py .vm/agent-bootstrap.log --jsonThe script parses both pretty and JSON log formats, strips ANSI codes, and prints each phase with its duration, status, and parallel grouping.
Inspect nspawn container status
Inside the VM, we isolate the kubelet / cri states inside a nspawn based container.
To inspect kubelet / cri states, please use machinectl shell <machine-name> --pipe <command>.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

