KIWI::SYSTEM::BOXBUILD(8)
π NAME π
Omg bestie, welcome to KIWI::SYSTEM::BOXBUILD(8) β the kiwi::system::boxbuild manual page. Its whole vibe? Build image in a self contained VM or container. Slay. β¨
β¨ SYNOPSIS β¨
kiwi-ng [global options] service <command> [<args>]
kiwi-ng system boxbuild --help
kiwi-ng system boxbuild --box=<name>
[--box-memory=<vmgb>]
[--box-console=<ttyname>]
[--box-smp-cpus=<number>]
[--box-debug]
[--container]
[--kiwi-version=<version>]
[--shared-path=<path>]
[--no-update-check]
[--no-snapshot]
[--no-accel]
[--9p-sharing | --virtiofs-sharing | --sshfs-sharing]
[--ssh-key=<name>]
[--ssh-port=<port>]
[--x86_64 | --aarch64]
[--machine=<qemu_machine>]
[--cpu=<qemu_cpu>]
kiwi <kiwi_build_command_args>...
kiwi-ng system boxbuild --list-boxes
πΈ DESCRIPTION πΈ
Okay so picture this: you're building an image in a totally self-contained environment. The boxbuild command uses KVM to start a virtual machine and runs the kiwi build command inside that virtual machine. The provided --description and --target-dir options are set up as shared folders between the host and the guest. No other data will be shared with the host, which also allows for cross distribution builds. Honestly iconic.
The boxbuild command provides the following additional features over the standard build command:
- Build images independent of the host. π«Ά
- Build images as normal user not as root. π
- Build cross distribution images on one host. π
- Build in predefined build VMs called boxes which includes all components needed to build appliances. π
For running the build process in a virtual machine, it's required to provide VM images that are suitable to perform this job. We call the VM images boxes, and they contain kiwi itself as well as all other components needed to build appliances. Those boxes are hosted in the Open Build Service and are publicly available on the Subprojects tab at: https://build.opensuse.org/project/show/Virtualization:Appliances:SelfContained
As a user, you don't need to work with the boxes because this is all done by the boxbuild command. It knows where to fetch the box and also cares for an update of the box when it has changed. Main character energy fr fr. π
For a detailed introduction, see Building in a Self-Contained Environment.
π OPTIONS π
--box=<name>β Name of the virtual machine that should be used for the build process. Pick your box, bestie. π--list-boxesβ Show available build boxes. Window shopping, but make it builds. ποΈ--box-memory=<vmgb>β Amount of main memory to reserve for the virtual machine. The value is passed as is to the QEMU-moption, so add a unit suffix, e.g.8G. By default, the memory setting of the selected box is used, which is8096Mfor the boxes provided with KIWI NG. Yes,8096Mβ copy it exactly, don't @ me. π--box-console=<ttyname>β Name of console in the kernel settings for the virtual machine. By default, set tohvc0. π₯οΈ--box-smp-cpus=<number>β Number of CPUs to use in the SMP setup. By default,4CPUs will be used. More CPUs, more chaos, more slay. π₯--box-debugβ In debug mode, the started virtual machine will be kept open. Stare at it. Investigate. Live your truth. π--containerβ Build in container instead of a VM. Options related to building in a VM will have no effect. Different box, same dream. π«Ά--kiwi-version=<version>β Specify a KIWI version to use for the build. The referenced KIWI will be fetched frompipand replaces the box installed KIWI version. Note: If--no-snapshotis used in combination with this option, the change of the KIWI version will be permanently stored in the used box. Permanent means permanent, bestie. π--shared-path=<path>β Optional host path to share with the box. The same path as it is present on the host will also be available inside of the box during build time. Sharing is caring, but only this path. π--no-update-checkβ Skip check for available box update. The option has no effect if the selected box does not yet exist on the host. No box, no update check, no problem. β¨--no-snapshotβ Run box with snapshot mode switched off. This causes the box disk file to be modified by the build process and allows to keep a persistent package cache as part of the box. The option can be used to increase the build performance due to data stored in the box which doesn't have to be reloaded from the network. On the contrary, this option invalidates the immutable box attribute and should be used with care. On update of the box, all data stored will be wiped. To prevent this, combine the option with the--no-update-checkoption. Read that again, bestie β this one is lowkey spicy. πΆοΈ--no-accelβ Run box without hardware acceleration. By default, KVM acceleration is activated. Sometimes you gotta go slow. π’--9p-sharing|--virtiofs-sharing|--sshfs-sharingβ Select sharing backend to use for sharing data between the host and the box. This can be either9p,virtiofsorsshfs. By default,9pis used. Choose your fighter. π₯--ssh-key=<name>β Name of ssh key to authorize for connection. By default,'id_rsa'is used. Your key, your entry. π--ssh-port=<port>β Port number to use to forward the guest's SSH port to the host. By default,'10022'is used. Port forwarded, problem solved. πͺ--x86_64|--aarch64β Select box for the given architecture. If no architecture is selected, the host architecture is used for selecting the box. The selected box architecture also specifies the target architecture for the image build with that box. Arch selecting, but make it fashion. π¦--machine=<qemu_machine>β Optional machine name used by QEMU. By default, no specific value is used here and QEMU selects its default machine type. For cross arch builds or for system architectures for which QEMU defines no default like for Arm, it's required to specify a machine name. If you don't care about reproducing the idiosyncrasies of a particular bit of hardware, the best option is to use the'virt'machine type.'virt'is giving sensible default, periodt. π--cpu=<qemu_cpu>β Optional CPU type used by QEMU. By default, the host CPU type is used, which is only a good selection if the host and the selected box are from the same architecture. On cross arch builds, it's required to specify the CPU emulation the box should use. Match the CPU to the vibe check. π§kiwi <kiwi_build_command_args>...β List of command parameters as supported by thekiwi-ng system buildcommand. The information given here is passed along to thekiwi-ng system buildcommand running in the virtual machine or container. The--descriptionand--target-diroptions are mandatory. Global options like--typeor--profilemust be passed as global options to theboxbuildcall and are forwarded to the build command. See the example below how to provide options to the build command correctly. For compatibility with the formerkiwi-boxed-plugin, the--separator is accepted as an alias forkiwi. This is the part where you pass the actual build args, bestie β don't forget--descriptionand--target-dir. π
π¦ ENVIRONMENT π¦
KIWI_BOXED_CACHE_DIRβ By default, VM disk images used as build environment are stored in the$HOME/.kiwi_boxesdirectory. To override this location, set theKIWI_BOXED_CACHE_DIRenvironment variable to a different absolute path. Absolute path only β no vibes-based relative paths. πKIWI_BOXED_PLUGIN_CFGβ Path to a custom boxes configuration file. If not set, the configuration is searched in the following order:$PWD/kiwi_boxed_plugin.yml,$HOME/.config/kiwi/kiwi_boxed_plugin.yml,/etc/kiwi_boxed_plugin.ymland the default configuration provided with KIWI NG. It checks in order, like a group chat scrolling for receipts. π
π EXAMPLE π
$ git clone https://github.com/OSInside/kiwi-descriptions
$ kiwi-ng --profile Virtual system boxbuild --box leap kiwi \
--description kiwi-descriptions/suse/x86_64/suse-leap-15.6 \
--target-dir /tmp/myimage
π AUTHOR π
Marcus SchΓ€fer. Author icon, honestly. π
π COPYRIGHT π
2020-2026, Marcus SchΓ€fer β copyright stays exactly like that, bestie. π«Ά
Catch you in KIWI NG 11.1.1, dated Oct 06, 2026 β this was KIWI::SYSTEM::BOXBUILD(8), and yes, you ate. π
β¨π
π¦ where this page comes from
- epel 10: kiwi-cli 11.1.1-2.el10_3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms