MMDEBST...ILD-QEMU(1)

πŸ“¦
version 1.5.7 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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:

  1. it uses mmdebstrap(1) instead of vmdb2(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.
  2. it uses systemd-boot(7), which means it only supports booting via EFI. only. that's the whole vibe.
⚠️ so for architectures where autopkgtest-virt-qemu(1) does not default to EFI booting, you literally must pass --boot=efi when you invoke the autopkgtest virt backend. don't forget it, bestie 😭

πŸŽ€ POSITIONAL PARAMETERS πŸŽ€

  • RELEASE β€” the release you wanna download from the MIRROR. 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 to http://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 a dpkg(1) architecture. if you omit it, the host architecture is assumed. lowkey convenient πŸ’«
    • --arch=ARCH is 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 🐚
  • --size=SIZE β€” specifies the image size for the virtual machine. defaults to 25G πŸ“
  • --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 --keyring parameter to mmdebstrap πŸ”‘
  • --sshkey=sshkey β€” install the given ssh public key file into the virtual machine image for the root user. 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