autopkgtest-build-qemu1
Create autopkgtest virtual machine images for autopkgtest-virt-qemu
Usage
autopkgtest-build-qemu [OPTIONS]
RELEASE
IMAGE
Deprecated form:
autopkgtest-build-qemu [OPTIONS]
RELEASE
IMAGE
MIRROR
[ARCHITECTURE]
[SCRIPT]
[SIZE]
Overview
autopkgtest-build-qemu creates virtual machine images suitable for use with autopkgtest's QEMU runner autopkgtest-virt-qemu(1).
Under the hood, it uses vmdb2(1) to create the images.
Note that you need to call this as root, unless fakemachine(1) is available. fakemachine is currently only available on x86_64.
Positional parameters
RELEASE
|
The release to download from the MIRROR. This parameter is required. |
|---|---|
IMAGE
|
The file to write, in qcow2 format. This parameter is required. |
Options
-
--mirror=MIRROR -
Specify which distribution to install. It defaults to http://deb.debian.org/debian (i.e. Debian), but you can pass a mirror of any Debian derivative.
The third positional parameter is a deprecated way to specify this.
-
--keyring=KEYRING -
Specify the path to a keyring used to verify the apt repository. By default, the choice of keyring will be left to debootstrap. This option is mainly useful for use with a Debian derivative in conjunction with the --mirror option.
-
--architecture=ARCHITECTURE -
Set the architecture for the virtual machine image, specified as a dpkg(1) architecture. If omitted, the host architecture is assumed.
--arch=ARCH is an alias for this option.The fourth positional parameter is a deprecated way to specify this.
-
--script=SCRIPT -
Specifies a user script that will be called with the root filesystem of the image as its first parameter. This script can them make any necessary modifications to the root filesystem.
The script must be a POSIX shell script, and should not depend on bash-specific features. This script will be executed inside a chroot(1) call in the virtual machine root filesystem.
The fifth positional parameter is a deprecated way to specify this.
-
--size=SIZE -
Specifies the image size for the virtual machine, defaulting to 25G.
The sixth positional parameter is a deprecated way to specify this.
-
--apt-proxy=PROXY -
Specify an apt proxy to use in the virtual machine. By default, if you have an apt proxy configured on the host, the virtual machine will automatically use this, otherwise there is no default.
--apt-proxy=DIRECTcan be used to force an apt proxy on the host to be ignored.
-
--boot=auto|bios|efi|ieee1275|none -
Select the way the generated image will expect to be booted.
autochooses a suitable boot mode for the architecture, and is the default.biosinstalls an x86 BIOS bootloader on i386 or amd64.autoselects this mode on i386 or amd64.efiinstalls an EFI bootloader on any architecture for whichvmdb2(1)supports it, which currently means amd64, arm64, armhf or i386. The--efioption is an alias for this mode.autoselects this mode on arm64 or armhf.ieee1275installs an IEEE 1275 (OpenFirmware) bootloader on ppc64el.autoselects this mode on ppc64el.nonedoes not do anything special. The image will not be bootable unless the specified--scriptarranges for a suitable bootloader to be installed, or the autopkgtest-virt-qemu(1)--qemu-optionsboot the image specially (for example by specifying a kernel directly).
Environment
If the $AUTOPKGTEST_KEEP_APT_SOURCES environment variable is set to a non-empty value, autopkgtest-build-qemu will keep whatever /etc/apt/sources.list was created by debootstrap.
Otherwise, if the $AUTOPKGTEST_APT_SOURCES_FILE environment variable is set to a non-empty value, for example AUTOPKGTEST_APT_SOURCES_FILE=/home/me/mydistro/sources.list, then autopkgtest-build-qemu will read that file (on the host system) and use it to populate /etc/apt/sources.list in the virtual machine; or if the $AUTOPKGTEST_APT_SOURCES environment variable is set to a non-empty value, for example AUTOPKGTEST_APT_SOURCES=$(cat /home/me/mydistro/sources.list), autopkgtest-build-qemu will write it directly into /etc/apt/sources.list in the virtual machine.
When $AUTOPKGTEST_APT_SOURCES_FILE or $AUTOPKGTEST_APT_SOURCES contain sources in the deb822 format, then sources are written to /etc/apt/sources.list.d/<distro>.sources in the virtual machine, rather than /etc/apt/sources.list.
You can specify an apt proxy to use in the virtual machine in the $AUTOPKGTEST_APT_PROXY environment variable. If you have an apt proxy configured on the host, the virtual machine will automatically use this, otherwise there is no default.
Examples
# autopkgtest-build-qemu unstable /path/to/debian-unstable.img
$ sudo autopkgtest-build-qemu stable /path/to/debian-stable-i386.img i386
$ sudo autopkgtest-build-qemu bionic /path/to/ubuntu-bionic.img http://archive.ubuntu.com/ubuntu
Authors and copyright
autopkgtest-build-qemu was written by Antonio Terceiro <[email protected]>
This manpage is part of autopkgtest, a tool for testing Debian binary packages. autopkgtest is Copyright (C) 2006-2018 Canonical Ltd and others.
See /usr/share/doc/autopkgtest/CREDITS for the list of contributors and full copying conditions.
Releases
4 releases since Debian 10 (Buster); the text changed 3 times.
--apt-proxy since Debian 12 (Bookworm);
--architecture since Debian 12 (Bookworm);
--boot since Debian 12 (Bookworm);
--keyring since Debian 13 (Trixie);
--mirror since Debian 12 (Bookworm);
--script since Debian 12 (Bookworm);
--size since Debian 12 (Bookworm).