azldev-image
它能做什么
这项技能说明如何使用 KIWI 定义,通过 azldev 构建和测试系统镜像。它适用于在 azldev 发行版中创建容器或虚拟机镜像的开发者。
适用场景
- ✓当你需要用已构建的软件包来构建容器或虚拟机镜像时。
- ✓当你想在测试虚拟机中启动已构建的镜像时。
- ✓当你需要在配置中注册或修改镜像设置时。
技能链接
https://github.com/microsoft/azurelinux/blob/4.0/.agents/skills/azldev-image/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我在 azldev 项目中构建 container-base 镜像,并在测试虚拟机中启动它。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会使用镜像列表、构建、启动和测试命令,并使用配置中定义的镜像。运行前它会先检查所安装工具版本的参数。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Build and boot images
An image assembles built RPMs into a deliverable — a container or a bootable VM.
azldev drives the build from a kiwi-ng definition; the .kiwi file itself is
upstream KIWI NG (docs) and azldev does not
own its schema.
Commands
Images are selected by their name as a positional argument (not -p).
| Task | Command |
|---|---|
| List images | azldev image list |
| Build an image (kiwi-ng) | azldev image build <name> |
| Boot an image in a QEMU VM | azldev image boot <name> |
| Run an image's tests | azldev image test <name> |
| Customize a pre-built image | azldev image customize |
azldev image build takes --local-repo / --remote-repo to add package sources and
--arch to target an architecture. When the selected distro version defines
kiwi-config-override, azldev passes it to KIWI with --config. These top-level
overrides have highest precedence. azldev image boot takes a built image name, or an
explicit --image-path / --iso. Confirm current flags with
azldev image <command> --help (there are more subcommands, e.g. inject-files).
Registering an image
Images are declared under [images.<name>] (conventionally in an images.toml):
[images.container-base]
description = "Container base image"
definition = { type = "kiwi", path = "container-base/container-base.kiwi", profile = "core" }
architectures = ["x86_64", "aarch64"]
[images.container-base.capabilities]
container = true
systemd = false
[images.container-base.properties]
openssl-fips-provider = "upstream"
[images.container-base.tests]
tests = [{ name = "smoke" }]
definition.typeiskiwi(the only type today);pathpoints at the.kiwifile;profileselects a kiwi profile (optional).- Boolean
capabilitiesare tri-state flags describing the image —machine-bootable,container,systemd,runtime-package-management,wsl,installer-media,fips-enabled, andcvm. Set only the ones that apply. propertiesis an extensible string-to-string metadata bag. For example,openssl-fips-provider = "upstream"records the image's provider policy without requiring azldev to define that property in its schema.architectures = ["x86_64", "aarch64"]is optional; when unset or empty, the image is treated as unrestricted (all recognized architectures). Set it to restrict which architecturesimage build --archallows for the image.tests.testslists the tests or test groupsazldev image testruns locally. An image ref may also setsku-groups = ["<name>", ...]to fan a test or group out across the VM sizes of one or more[sku-groups.<name>]entries; that fan-out is done by external test orchestration, not by localazldev image test. Do not mapsku-groupsonto arbitrary LISA tests: LISA tests carry their own requirements and are skipped when the SKU does not meet them, so this is meaningful only for the special case of multi-SKU performance tests.publish.channelslists the channels the image publishes to.
The kiwi definition
The .kiwi file is upstream KIWI NG XML — azldev does not own its schema. It selects the
image type (container vs. VM), package lists, repositories, and boot configuration. See
the KIWI NG documentation for the format and elements.
Generated by azldev docs agent; do not hand-edit.
常见问题
什么格式定义镜像?
镜像使用 KIWI NG 定义文件,这是该工具构建所依据的上游格式。
可以不重新构建就启动镜像吗?
可以。技能说明,可以启动已构建的镜像名称,也可以指定明确的镜像文件。
镜像在哪里注册?
镜像在项目配置的 images 部分中声明,通常放在 images 文件中。
详情
作者的原始描述
Read this before building, booting, or configuring an azldev image. Explains the azldev image commands (list, build, boot, test, customize) and the [images.<name>] config (kiwi definition, capabilities, tests, publish); the kiwi XML format itself is upstream KIWI NG. Triggers include image build, image boot, kiwi, container image, VM image, images.toml.
repo: microsoft/azurelinux
热度
- GitHub 星标
- 5.4k
- 排名
- #14963
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
azldev-add-component
5.4k帮你的智能体把新的软件组件添加到 azldev Linux 发行版构建中,从检查上游规格文件(spec)到验证结果。
azldev-build-component
5.4k帮你的智能体构建和调试 azldev 软件包,包括渲染、构建和测试循环,以及修复失败的构建检查。
azldev-comp-toml
5.4k帮你的智能体编写、编辑和审查 azldev 用来描述每个软件包如何构建的组件定义文件。
azldev-mock
5.4k帮你的智能体在模拟构建环境中测试和检查已构建的软件包,使它们不会触及你自己的电脑。