> For the complete documentation index, see [llms.txt](https://handbook.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://handbook.bsdcn.org/di-18-zhang-oci-rong-qi/18.16.-kua-jia-gou-ce-shi.md).

# 18.16.跨架构测试

[emulators/qemu-user-static](https://cgit.freebsd.org/ports/tree/emulators/qemu-user-static/) 软件包可用于测试为其他架构构建的容器镜像。安装该软件包后，启用并启动相应服务，为所有受模拟的架构注册镜像激活器：

```sh
# pkg install emulators/qemu-user-static
# service qemu_user_static enable
# service qemu_user_static start
```

然后通过挂载相应的 QEMU 二进制文件，即可在 amd64 主机上运行 arm64 镜像：

```sh
# podman run -it --rm --arch=arm64 \
    -v /usr/local/bin/qemu-aarch64-static:/usr/local/bin/qemu-aarch64-static \
    ghcr.io/freebsd/freebsd-runtime:14.snap uname -a
FreeBSD 73d4049d10b2 14.2-RELEASE-p1 FreeBSD 14.2-RELEASE-p1 GENERIC arm64
```
