1KIWI::SYSTEM::BOXBUILD(8)  KIWI - Boxed Build Plugin KIWI::SYSTEM::BOXBUILD(8)
2
3
4

NAME

6       kiwi::system::boxbuild - Self Contained Image Build
7

SYNOPSIS

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]
21              [--x86_64 | --aarch64]
22              [--machine=<qemu_machine>]
23              [--cpu=<qemu_cpu>]
24              -- <kiwi_build_command_args>...
25          kiwi-ng system boxbuild --list-boxes
26          kiwi-ng system boxbuild help
27

DESCRIPTION

29       build  an  image  in a self contained environment. The boxbuild command
30       uses KVM to start a virtual machine and run the kiwi build command  in‐
31       side  of  that  virtual  machine. The provided --description and --tar‐
32       get-dir options are setup as shared folders between the  host  and  the
33       guest. No other data will be shared with the host which also allows for
34       cross distribution builds. The boxbuild command provides the  following
35       additional features over the standard build command:
36
37       • Build images independent of the host.
38
39       • Build images as normal user not as root.
40
41       • Build cross distribution images on one host.
42
43       • Build  in predefined build VMs called boxes which includes all compo‐
44         nents needed to build appliances.
45
46       For running the build process in a virtual  machine  it's  required  to
47       provide VM images that are suitable to perform this job. We call the VM
48       images boxes and they contain kiwi itself as well as all  other  compo‐
49       nents  needed  to  build appliances. Those boxes are hosted in the Open
50       Build Service and are publicly available on  the  Subprojects  tab  at:
51       https://build.opensuse.org/project/show/Virtualization:Appliances:SelfContained
52
53       As a user you don't need to work with the boxes  because  this  is  all
54       done  by  the plugin. The boxbuild command knows where to fetch the box
55       and also cares for an update of the box when it has changed.
56

OPTIONS

58       --box=<name>
59              Name of the virtual machine that should be used  for  the  build
60              process.
61
62       --list-boxes
63              show available build boxes.
64
65       --box-memory=<vmgb>
66              Number of GBs to reserve as main memory for the virtual machine.
67              By default 8GB will be used.
68
69       --box-smp-cpus=<number>
70              Number of CPUs to use in the SMP setup. By default 4  CPUs  will
71              be used
72
73       --no-update-check
74              Skip check for available box update. The option has no effect if
75              the selected box does not yet exist on the host.
76
77       --no-snapshot
78              Run box with snapshot mode switched off.  This  causes  the  box
79              disk file to be modified by the build process and allows to keep
80              a persistent package cache as part of the box.  The  option  can
81              be  used to increase the build performance due to data stored in
82              the box which doesn't have to be reloaded from the  network.  On
83              the contrary this option invalidates the immutable box attribute
84              and should be used with care. On update  of  the  box  all  data
85              stored  will  be  wiped. To prevent this combine the option with
86              the --no-update-check option.
87
88       --9p-sharing|--virtiofs-sharing
89          Select sharing backend to use for sharing data between the host  and
90          the box. This can be either 9p or virtiofs. By default 9p is used
91
92       --x86_64|--aarch64
93          Select  box  for  the x86_64 architecture. If no architecture is se‐
94          lected the host architecture is used for selecting the box. The  se‐
95          lected  box  architecture also specifies the target architecture for
96          the image build with that box.
97
98       --box-debug
99              In debug mode the started virtual machine will be kept open
100
101       --kiwi-version=<version>
102              Specify a KIWI version to use for the build. The referenced KIWI
103              will  be  fetched  from  pip and replaces the box installed KIWI
104              version. Note: If --no-snapshot is used in combination with this
105              option,  the  change  of  the  KIWI  version will be permanently
106              stored in the used box.
107
108       --shared-path=<path>
109              Optional host path to share with the box. The same path as it is
110              present  on  the  host  will also be available inside of the box
111              during build time.
112
113       --machine=<qemu_machine>
114              Optional machine name used by QEMU. By default no specific value
115              is  used  here  and  qemu selects its default machine type.  For
116              cross arch builds or for system architectures for which QEMU de‐
117              fines  no  default  like for Arm, it's required to specify a ma‐
118              chine name.
119
120              If you don’t care about reproducing the idiosyncrasies of a par‐
121              ticular  bit  of  hardware, the best option is to use the 'virt'
122              machine type.
123
124       --cpu=<qemu_cpu>
125              Optional CPU type used by QEMU. By default the host CPU type  is
126              used which is only a good selection if the host and the selected
127              box are from the same architecture. On cross  arch  builds  it's
128              required to specify the CPU emulation the box should use
129
130       -- <kiwi_build_command_args>...
131          List  of  command  parameters as supported by the kiwi-ng build com‐
132          mand. The information given here is passed along to the kiwi-ng sys‐
133          tem  build  command  running in the virtual machine. See the Example
134          below how to provide options to the build command correctly.
135

EXAMPLE

137          $ git clone https://github.com/OSInside/kiwi-descriptions
138
139          $ kiwi --type vmx system boxbuild --box suse -- \
140              --description kiwi-descriptions/suse/x86_64/suse-tumbleweed-JeOS \
141              --target-dir /tmp/myimage
142

AUTHOR

144       Marcus Schäfer
145
147       2020, Marcus Schäfer
148
149
150
151
1520.2.13                           Jun 21, 2021        KIWI::SYSTEM::BOXBUILD(8)
Impressum