.SH "MIRROR"
It is \fBhighly recommended\fR that you use an APT cache, like approx(8), or
apt\-cacher\-ng(8), on the \fBlocal\fR machine (so that the VM guest can
access it) as a mirror. This will dramatically speed up the package build
process. On the author's local machine, installing the build dependencies of
even larger packages takes only a few seconds.
.SH "SPECIAL CASES"
If the distribution is \fBexperimental\fR, \fIsources.list\fR will contain
entries for both \fBexperimental\fR and \fBunstable\fR.
.PP
If the distribution ends with \fB-backports\fR, \fIsources.list\fR will contain
entries for both the distribution and its base.
.SH "SHARING FILES"
Among other things, autopkgtest-virt-qemu(1) has built-in support for sharing a
directory on the host with the guest, so no further configuration should be
necessary when accessing the VM using autopkgtest.
.PP
However, for cases where the VM is launched via QEMU directly, a \fI/shared\fR
mount point for a 9p filesystem has been added to the VM's \fI/etc/fstab\fR. It
is configured with the \fBnofail\fR option, so it will be ignored if nothing is
being shared.
.PP
To share a directory on the host with the VM, QEMU should be started with
the following additional options:
.PP
\fB \-virtfs path=/path/to/host/dir,local,id=shared,mount_tag=shared,security_model=none
.SH EXAMPLES
\fB$ sudo qemu\-sbuild\-create unstable http://deb.debian.org/debian\fR
.PP
This will create an image \fBunstable\-autopkgtest\-amd64.img\fR (assuming
that the host architecture is amd64) with the unstable distribution.
.PP
\fB$ sudo qemu\-sbuild\-create buster\-backports http://deb.debian.org/debian\fR
.PP
This will create an image \fBbuster\-backports\-autopkgtest\-amd64.img\fR,
with \fIsources.list\fR entries for both buster and buster-backports.
.PP
\fB$ sudo qemu\-sbuild\-create \-\-skel DIR unstable http://deb.debian.org/debian\fR
.PP
The files in \fBDIR\fR will be copied into /root (that is, root's $HOME). This
can be used, for example, to copy an \fB.ssh/authorized_keys\fR file, so that
one can connect to the running image using SSH (assuming openssh\-server is
installed).
.PP
\fB$ sudo qemu\-sbuild\-create \-\-install\-packages openssh\-server unstable http://deb.debian.org/debian\fR
.PP
This would install openssh\-server. The package will be downloaded in the
target environment using 'apt-get'.
.PP
A popular package to pre\-install this way would be \fBdebhelper\fR, as it is a
build dependency of the vast majority of Debian packages.
.PP
\fB$ sudo qemu\-sbuild\-create \-\-extra\-deb FOO.deb unstable http://deb.debian.org/debian\fR
.PP
This would install the package \fBFOO.deb\fR from the local filesystem.
Useful, for example, to install additional keyring packages.
.PP
\fB$ sudo qemu\-sbuild\-create --shared-mountpoint unstable http://deb.debian.org/debian\fR
.PP
This will create an image with an fstab entry for the directory \fI/shared\fR.
.SH COPYRIGHT
Copyright \[co] 2020 Christian Kastner <ckk@kvr.at>
.SH "SEE ALSO"
.BR qemu\-sbuild (1),
.BR qemu\-sbuild\-update (1).
