autopkgtest-build-qemu(1)
π autopkgtest-build-qemu β the manual page, but make it slay π
okay bestie, so this is autopkgtest-build-qemu, and it lives in the General Commands Manual section (section 1, obvi). Think of it as the girl who builds the whole VM image for you before autopkgtest-virt-qemu even gets to show up. She's the prep squad. She's the backstage crew. And she ate. π
β¨ NAME β¨
autopkgtest-build-qemu β literally creates autopkgtest virtual machine images for autopkgtest-virt-qemu. That's the whole job. That's her purpose. She's booked and busy. π
β¨ SYNOPSIS β¨
autopkgtest-build-qemu [OPTIONS] RELEASE IMAGE
and then, the deprecated form, which is giving legacy and nostalgia:
autopkgtest-build-qemu [OPTIONS] RELEASE IMAGE MIRROR [ARCHITECTURE]
[SCRIPT] [SIZE]
β¨ DESCRIPTION β¨
So basically, autopkgtest-build-qemu creates virtual machine images that are suitable for use with autopkgtest's QEMU runner, aka autopkgtest-virt-qemu(1). They're made for each other. It's giving soulmates, no cap. π«Ά
Under the hood, she uses vmdb2(1) to actually create the images. She doesn't do it alone β she has a whole team. Iconic collaboration behaviour.
β οΈ Heads up bestie: you need to call this as root, unlessfakemachine(1)is available. Andfakemachineis currently only available on x86_64. So if you're not on x86_64 and you're not rootβ¦ yeah, that's a no. π
β¨ POSITIONAL PARAMETERS β¨
RELEASEβ the release you wanna download from theMIRROR. This one is required, bestie, you can't skip her, she's mandatory.IMAGEβ the file to write, inqcow2format. Also required. No image, no vibe. π
β¨ OPTIONS β¨
--mirror=MIRRORβ specify which distribution to install. The default ishttp://deb.debian.org/debian(i.e. Debian, the moment), but you can pass a mirror of literally any Debian derivative. π
Also, the third positional parameter is a deprecated way to specify this. We do not recommend the deprecated way. She's retired for a reason. π
--keyring=KEYRINGβ specify the path to a keyring used to verify the apt repository. By default, the choice of keyring is left to debootstrap β she'll handle it, she's trustworthy. This option is mainly useful when you're working with a Debian derivative, together with the--mirroroption. Teamwork, fr fr. π¦--architecture=ARCHITECTUREβ set the architecture for the virtual machine image, specified as adpkg(1)architecture. If you omit it, the host architecture is assumed. Home team advantage, lowkey.
--arch=ARCH is an alias for this option. Same girl, different name. π
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 then make any necessary modifications to the root filesystem. It's your little moment of creative control. β¨
The script must be a POSIX shell script, and it should not depend on bash-specific features. (Read: no bash-isms, bestie, she will not be playing that.) 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, and it defaults to25G. That's a whole lot of room. She's not gonna be cramped.
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 it; otherwise, there is no default. So it's giving "if you know, you know" βiykyk. πΈ
--apt-proxy=DIRECT can be used to force an apt proxy on the host to be ignored. The audacity. The power. She said not today. π
--boot=auto|bios|efi|ieee1275|noneβ select the way the generated image will expect to be booted. This is the main character choice of the whole build, ngl.autochooses a suitable boot mode for the architecture, and it's the default. She picks for you. She knows best. πbiosinstalls an x86 BIOS bootloader oni386oramd64.autoselects this mode oni386oramd64.efiinstalls an EFI bootloader on any architecture for whichvmdb2(1)supports it, which currently meansamd64,arm64,armhfori386. The--efioption is an alias for this mode.autoselects this mode onarm64orarmhf.ieee1275installs an IEEE 1275 (OpenFirmware) bootloader onppc64el.autoselects this mode onppc64el.nonedoes not do anything special. And listen β the image will not be bootable unless the specified--scriptarranges for a suitable bootloader to be installed, or theautopkgtest-virt-qemu(1)--qemu-optionsboot the image specially (for example by specifying a kernel directly). So likeβ¦noneis the chaotic option. Choose her wisely or perish. π
β¨ 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. She's preserving it. Respect the heritage. π―οΈ
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. Reading is fundamental, bestie. π
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)
then autopkgtest-build-qemu will write it directly into /etc/apt/sources.list in the virtual machine. Direct. No middleman. π
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. Different folder, same energy. π¦
You can also 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 it; otherwise, there is no default. π
β¨ EXAMPLES β¨
Run as root, being a little dramatic about it:
# autopkgtest-build-qemu unstable /path/to/debian-unstable.img
Run with sudo, and tell her the architecture too:
$ sudo autopkgtest-build-qemu stable /path/to/debian-stable-i386.img
i386
Run with sudo and point her at the Ubuntu mirror:
$ sudo autopkgtest-build-qemu bionic /path/to/ubuntu-bionic.img
http://archive.ubuntu.com/ubuntu
β¨ SEE ALSO β¨
autopkgtest-virt-qemu(1), vmdb2(1), autopkgtest(1), /usr/share/doc/autopkgtest/.
Go read them. She said so. π
β¨ AUTHORS AND COPYRIGHT β¨
autopkgtest-build-qemu was written by Antonio Terceiro <terceirio@debian.org>. Shoutout to the author, we love a legend. π
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. Always read the credits, bestie, it's how we honour the people. π«Ά
and that's the whole page, mwah π β this cutie came out of the Linux Programmer's Manual, dated 2014. periodt. πβ¨
π¦ where this page comes from
- debian trixie: autopkgtest 5.49 Β· GPL-2.0-or-later
- ubuntu jammy: autopkgtest 5.47~22.04.1 Β· GPL-2.0-or-later
- ubuntu noble: autopkgtest 5.55~24.04.1 Β· GPL-2.0-or-later
- ubuntu questing: autopkgtest 5.49
- ubuntu resolute: autopkgtest 5.55 Β· GPL-2.0-or-later
- ubuntu stonking: autopkgtest 6.0 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms