tikoci/quickchr/tikoci-qemu-user-emulation
Claude Code and agent skill by tikoci/quickchr
- community
Checking that the SKILL.md file is still in the repository.
QEMU user-mode emulation for running foreign-architecture binaries, plus macOS VM bridging for raw-socket Linux tools. Use when: running x86 binaries on ARM hosts, setting up qemu-user-static, using binfmt_misc, building containers with QEMU emulation, running Linux network tools (like MikroTik netinstall-cli) on macOS via QEMU system VM, or when the user mentions qemu-i386, qemu-user, binfmt, cross-architecture emulation, or vmnet-bridged.
Install
npx vskill@latest install tikoci/quickchr/tikoci-qemu-user-emulationSKILL.md
QEMU User-Mode Emulation & macOS VM Bridging
QEMU User-Mode Emulation
QEMU user-mode lets you run a binary compiled for one architecture on a host with a different architecture. The binary runs as a regular process — no VM, no kernel emulation. System calls are translated to the host kernel.
Use Case
Run x86/i386 Linux binaries (like netinstall-cli) on ARM/ARM64 Linux hosts. On x86_64 Linux, the kernel natively supports running i386 binaries, so no QEMU is needed.
Installation
| Platform | Package | Binary name | |
|---|---|---|---|
| Debian/Ubuntu | qemu-user-static | qemu-i386-static | |
| Alpine | qemu-i386 | qemu-i386 | |
| Fedora/RHEL | qemu-user-static | qemu-i386-static | |
| Container (tonistiigi/binfmt) | N/A | qemu-i386 |
Note: Debian/Ubuntu use qemu-i386-static (statically linked — can be copied into containers). Alpine uses qemu-i386 (dynamically linked — must stay on the host or in a matching rootfs).
Direct Usage
Auto-Detection Pattern
When you need to find the right QEMU binary across platforms:
binfmt_misc (Automatic Transparent Emulation)
Linux's binfmt_misc can automatically invoke QEMU for foreign binaries:
In containers: The QEMU binary must be accessible inside the container's filesystem. With static QEMU (qemu-i386-static), copy it into the container image. With binfmt and the F flag, the kernel pre-loads the interpreter.
Container Embedding
For containers that need to run x86 binaries on ARM hosts, embed QEMU in the image:
In the container, invoke the binary as: ./i386 ./netinstall-cli [args...]
macOS: When User-Mode Isn't Enough
QEMU user-mode is a Linux-only feature. On macOS, you cannot use qemu-i386 user-mode. For Linux ELF binaries that need raw network access (BOOTP/TFTP on privileged ports), a full QEMU system VM is required.
vmnet-bridged + 9p Pattern
Boot a minimal Alpine Linux VM that bridges to a macOS network interface (L2 access) and shares the host working directory via 9p virtfs. The Linux binary runs natively inside x86_64 Linux — no user-mode QEMU.
Key components:
qemu-system-x86_64(brew install qemu) +sudo(for vmnet-bridged)- Alpine
linux-virtkernel + custom initramfs (Alpine rootfs + kernel modules + init script) - Kernel modules loaded via
insmodin explicit dependency order (busybox has nomodprobe) virtio_netdepends onnet_failover→failover(not obvious)9pdepends on9pnet_virtio→9pnet→netfs
Critical lessons:
- Get kernel and modules from the same
linux-virtAPK — version mismatch breaks module loading - Busybox
insmodcannot load compressed.ko.gz— decompress at build time netinstall-clirequires an IPv4 address on the interface (use link-local169.254.1.1/16)
See macOS VM bridging reference for the full QEMU launch command, initramfs build process, init script, and module load order.
Additional Resources
Reference files:
- For full macOS VM launch command, initramfs build, init script, and module load order: see macOS VM bridging reference
Related skills:
- For RouterOS CHR system-level QEMU (full RouterOS in VM): see the
routeros-qemu-chrskill - For building OCI images with embedded QEMU: see the
tikoci-oci-image-buildingskill - For netinstall-cli specifics: see the
routeros-netinstallskill
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/tikoci-qemu-user-emulation/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tikoci/quickchr/tikoci-qemu-user-emulation)