.SH CONSIDERATIONS
Using a fast temporary image overlay is key to faster build times. An overlay
created on a tmpfs would is ideal, and can speed up I/O by an order of
magnitude,compared to a slow HDD. If \fItmp\fR or \fI$TMPDIR\fR are mountpoints
for a tmpfs, then all should be fine by default.
.PP
However, tmpfs filesytems are backed by memory and swap on the host, so a build
needing substantial disk space in the VM may fail. If this happens, the
\-\-overlay\-dir option should be used to point to a host directory with more
available disk space. Note that the base image itself must have been created
with a suitable size, see the \fB\-\-size\fR option to qemu\-sbuild\-create(1).
.SH LIMITATIONS
Due to the nature of sbuild's \fB\-\-chroot\-mode=autopkgtest\fR, not all
sbuild options are supported yet. In particular, getting an interactive
shell, for example using \fB\-\-build\-failed\-command\fR is \fBNOT\fR possible.
However, there are other ways to access the build environment (see below).
.SH "VM ACCESS"
sbuild's \fB\-\-chroot\-mode=autopkgtest\fR uses autopkgtest\-virt\-qemu under
the hood, so you will find an SSH shell on port 10022 (or the first free port
after that) if, and only if, the openssh\-server package is installed in the
VM.
.PP
As a futher consequence of this chroot mode, what is stated in
autopkgtest\-virt\-qemu(1) generally also holds here.
.PP
.SH EXAMPLES
\fB$ qemu\-sbuild \-d unstable \-s \-\-arch\-all FOO.dsc\fR
.PP
This will build the package \fBFOO.dsc\fR using \fBunstable\fR as the
Distribution in the generated .changes file.
.PP
Because the \fB\-\-image\fR option was not specified, the image
\fB$IMAGEDIR/unstable\-autopkgtest\-amd64.img\fR will be used to build the
image (assuming that the host architecture is amd64).
.PP
The \fB\-s\fR and \fB\-\-arch\-all\fR aren't known to qemu\-sbuild, and
are therefore will be passed on through to sbuild for it to use.
.SH ENVIRONMENT
When using default image detection (meaning the \fB\-\-image\fR option was not
used, and therefore the image name is generated using the distribution and
architecture names), \fBqemu\-sbuild\fR looks for images in \fB$IMAGEDIR\fR, or
\fB/var/cache/qemu\-sbuild\fR if \fB$IMAGEDIR\fR is unset.
.SH COPYRIGHT
Copyright \[co] 2020 Christian Kastner <ckk@kvr.at>
.SH "SEE ALSO"
.BR qemu\-sbuild\-create (1),
.BR qemu\-sbuild\-update (1).
