MMDEBST...ILD-QEMU(1)
π MMDEBST...ILD-QEMU(1) π
okay bestie, so this is the page for mmdebstrap-autopkgtest-build-qemu, part of the User Contributed Perl Documentation situation. it's giving "i make VM images and i make them reproducibly" and honestly? obsessed. let's get into it π«Ά
β¨ NAME β¨
mmdebstrap-autopkgtest-build-qemu β it's autopkgtest-build-qemu but without vmdb2, using mmdebstrap and EFI boot instead π¦
πΈ SYNOPSIS πΈ
mmdebstrap-autopkgtest-build-qemu [OPTIONS] --boot=efi RELEASE IMAGE
π DESCRIPTION π
so mmdebstrap-autopkgtest-build-qemu is a mostly compatible drop-in replacement for autopkgtest-build-qemu(1), but with two main character differences, and no cap:
- it uses
mmdebstrap(1)instead ofvmdb2(1). the way that this slays is that it can create QEMU disk images without needing superuser privileges π and with bit-by-bit reproducible output β¨ periodt. - it uses
systemd-boot(7), which means it only supports booting via EFI. only. that's the whole vibe.
β οΈ so for architectures whereautopkgtest-virt-qemu(1)does not default to EFI booting, you literally must pass--boot=efiwhen you invoke the autopkgtest virt backend. don't forget it, bestie π
π POSITIONAL PARAMETERS π
RELEASEβ the release you wanna download from theMIRROR. this one is required, no skipping π¨IMAGEβ the file to write, in raw format. also required π
π OPTIONS π
--mirror=MIRRORβ specify which distribution to install. defaults tohttp://deb.debian.org/debian(i.e. Debian), but you can pass a mirror of any Debian derivative. go off πͺ--architecture=ARCHITECTUREβ sets the architecture for the virtual machine image, specified as adpkg(1)architecture. if you omit it, the host architecture is assumed. lowkey convenient π«--arch=ARCHis an alias for this option. same thing, different font π
--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 β¨- the script must be a POSIX shell script, and should not depend on bash-specific features. it will be executed inside a
chroot(1)call in the virtual machine root filesystem. so like, keep it posix, babe π
- the script must be a POSIX shell script, and should not depend on bash-specific features. it will be executed inside a
--size=SIZEβ specifies the image size for the virtual machine. defaults to25Gπ--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 π«₯--boot=efi,--efiβ select the way the generated image will expect to be booted. unless you explicitly select--boot=efi, operation will fail π that's not a vibe check you wanna fail. be explicit.--keyring=KEYRINGβ passes an additional--keyringparameter tommdebstrapπ--sshkey=sshkeyβ install the given ssh public key file into the virtual machine image for therootuser. this option also causes the ssh server to be installed. by default, no key or server is installed ποΈ
π EXAMPLES π
okay first things first: make sure that /path/to/debian-unstable.img is a path that the unshared user has access to π«Ά you can do this by ensuring world-execute permissions on all path components, or by creating the image in a world-readable directory like /tmp before copying it into its final location. yes it's a whole thing. do it anyway.
$ mmdebstrap-autopkgtest-build-qemu --boot=efi --arch=amd64 unstable /path/to/debian-unstable.img
[...]
$ autopkgtest mypackage -- qemu --boot=efi --dpkg-architecture=amd64 /path/to/debian-unstable.img
and yes, make sure to add --boot=efi to both the mmdebstrap-autopkgtest-build-qemu invocation and the autopkgtest-virt-qemu invocation. both. not one. both π
now, creating bit-by-bit reproducible images from a given snapshot.d.o timestamp? say less:
SOURCE_DATE_EPOCH=1612543740 mmdebstrap-autopkgtest-build-qemu --boot=efi \
--mirror=http://snapshot.debian.org/archive/debian/20210205T164900Z/ \
unstable /path/to/debian-unstable.img
reproducible AND iconic. that's her. π
π₯ SEE ALSO π₯
k that's the whole page, bestie, you're fully prepped π and for the record, this was perl v5.40.1, dated 2025-08-13, in the MMDEBST...ILD-QEMU(1) section. go build some images, ur literally the main character π¦β¨
π¦ where this page comes from
- ubuntu resolute: mmdebstrap 1.5.7-3 Β· MIT
- ubuntu stonking: mmdebstrap 1.5.7-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms