1KIWI::SYSTEM::BOXBUILD(8) KIWI - Boxed Build Plugin KIWI::SYSTEM::BOXBUILD(8)
2
3
4
6 kiwi::system::boxbuild - Self Contained Image Build
7
9 kiwi-ng [global options] service <command> [<args>]
10
11 kiwi-ng system boxbuild -h | --help
12 kiwi-ng system boxbuild --box=<name>
13 [--box-memory=<vmgb>]
14 [--box-smp-cpus=<number>]
15 [--box-debug]
16 [--kiwi-version=<version>]
17 [--shared-path=<path>]
18 [--no-update-check]
19 [--no-snapshot]
20 [--9p-sharing | --virtiofs-sharing | --sshfs-sharing]
21 [--ssh-key=<name>]
22 [--x86_64 | --aarch64]
23 [--machine=<qemu_machine>]
24 [--cpu=<qemu_cpu>]
25 -- <kiwi_build_command_args>...
26 kiwi-ng system boxbuild --list-boxes
27 kiwi-ng system boxbuild help
28
30 build an image in a self contained environment. The boxbuild command
31 uses KVM to start a virtual machine and run the kiwi build command in‐
32 side of that virtual machine. The provided --description and --tar‐
33 get-dir options are setup as shared folders between the host and the
34 guest. No other data will be shared with the host which also allows for
35 cross distribution builds. The boxbuild command provides the following
36 additional features over the standard build command:
37
38 • Build images independent of the host.
39
40 • Build images as normal user not as root.
41
42 • Build cross distribution images on one host.
43
44 • Build in predefined build VMs called boxes which includes all compo‐
45 nents needed to build appliances.
46
47 For running the build process in a virtual machine it's required to
48 provide VM images that are suitable to perform this job. We call the VM
49 images boxes and they contain kiwi itself as well as all other compo‐
50 nents needed to build appliances. Those boxes are hosted in the Open
51 Build Service and are publicly available on the Subprojects tab at:
52 https://build.opensuse.org/project/show/Virtualization:Appliances:SelfContained
53
54 As a user you don't need to work with the boxes because this is all
55 done by the plugin. The boxbuild command knows where to fetch the box
56 and also cares for an update of the box when it has changed.
57
59 --box=<name>
60 Name of the virtual machine that should be used for the build
61 process.
62
63 --list-boxes
64 show available build boxes.
65
66 --box-memory=<vmgb>
67 Number of GBs to reserve as main memory for the virtual machine.
68 By default 8GB will be used.
69
70 --box-smp-cpus=<number>
71 Number of CPUs to use in the SMP setup. By default 4 CPUs will
72 be used
73
74 --no-update-check
75 Skip check for available box update. The option has no effect if
76 the selected box does not yet exist on the host.
77
78 --no-snapshot
79 Run box with snapshot mode switched off. This causes the box
80 disk file to be modified by the build process and allows to keep
81 a persistent package cache as part of the box. The option can
82 be used to increase the build performance due to data stored in
83 the box which doesn't have to be reloaded from the network. On
84 the contrary this option invalidates the immutable box attribute
85 and should be used with care. On update of the box all data
86 stored will be wiped. To prevent this combine the option with
87 the --no-update-check option.
88
89 --9p-sharing|--virtiofs-sharing|--sshfs-sharing
90 Select sharing backend to use for sharing data between the host and
91 the box. This can be either 9p, virtiofs or sshfs. By default 9p is
92 used
93
94 --ssh-key=<name>
95 Name of ssh key to authorize for connection. By default
96 'id_rsa' is used.
97
98 --x86_64|--aarch64
99 Select box for the x86_64 architecture. If no architecture is se‐
100 lected the host architecture is used for selecting the box. The se‐
101 lected box architecture also specifies the target architecture for
102 the image build with that box.
103
104 --box-debug
105 In debug mode the started virtual machine will be kept open
106
107 --kiwi-version=<version>
108 Specify a KIWI version to use for the build. The referenced KIWI
109 will be fetched from pip and replaces the box installed KIWI
110 version. Note: If --no-snapshot is used in combination with this
111 option, the change of the KIWI version will be permanently
112 stored in the used box.
113
114 --shared-path=<path>
115 Optional host path to share with the box. The same path as it is
116 present on the host will also be available inside of the box
117 during build time.
118
119 --machine=<qemu_machine>
120 Optional machine name used by QEMU. By default no specific value
121 is used here and qemu selects its default machine type. For
122 cross arch builds or for system architectures for which QEMU de‐
123 fines no default like for Arm, it's required to specify a ma‐
124 chine name.
125
126 If you don’t care about reproducing the idiosyncrasies of a par‐
127 ticular bit of hardware, the best option is to use the 'virt'
128 machine type.
129
130 --cpu=<qemu_cpu>
131 Optional CPU type used by QEMU. By default the host CPU type is
132 used which is only a good selection if the host and the selected
133 box are from the same architecture. On cross arch builds it's
134 required to specify the CPU emulation the box should use
135
136 -- <kiwi_build_command_args>...
137 List of command parameters as supported by the kiwi-ng build com‐
138 mand. The information given here is passed along to the kiwi-ng sys‐
139 tem build command running in the virtual machine. See the Example
140 below how to provide options to the build command correctly.
141
143 $ git clone https://github.com/OSInside/kiwi-descriptions
144
145 $ kiwi --type vmx system boxbuild --box suse -- \
146 --description kiwi-descriptions/suse/x86_64/suse-tumbleweed-JeOS \
147 --target-dir /tmp/myimage
148
150 Marcus Schäfer
151
153 2020, Marcus Schäfer
154
155
156
157
1580.2.17 Dec 10, 2021 KIWI::SYSTEM::BOXBUILD(8)