autopkgtes...untu-cloud(1)
π autopkgtest-buildvm-ubuntu-cloud β bestie edition π
okay so real talk, this is a page from the General Commands Manual (Linux Programmer's Manual, no less π), and it's all about autopkgtest-buildvm-ubuntu-cloud. sit down, grab a strawberry, we're doing this π
β¨ NAME β¨
autopkgtest-buildvm-ubuntu-cloud β bestie, this makes you a Ubuntu cloud image based VM so that autopkgtest-virt-qemu can do its lil thing π¦
πΈ SYNOPSIS πΈ
autopkgtest-buildvm-ubuntu-cloud [options]
π DESCRIPTION π
So what this diva actually does: it downloads an Ubuntu cloud image and then configures it for autopkgtest's QEMU runner (autopkgtest-virt-qemu). and like, it does a lot of glow-up work:
- Resize the image, adding 20 GB to its default size (you can change this with an option, no stress), which ought to be sufficient for most tests. πͺ
- Create a user
ubuntuwith passwordubuntu. iconic, honestly. - Add apt sources for
restrictedandmultiversecomponents. slay β¨ - Create an
init.dscript to start a root shell onttyS1at boot, so thatautopkgtest-virt-qemucan be used without additional arguments or logging in throughttyS0. the way that this just works π
You can select release, architecture, apt proxy, etc. with options. The defaults are aimed at testing the development series of the architecture of your host system. very "it girl picks sensible defaults" of it π
π₯ OPTIONS π₯
-aarch |--arch=archβ Ubuntu architecture name, e. g.i386oramd64. Default is the host system architecture.-rcodename |--release=codenameβ Ubuntu release code name, e. g.trusty. Default is the current development series (this needspython-distro-infoinstalled, jsyk π).-mURL |--mirror=URLβ Mirror for apt (default:http://archive.ubuntu.com/ubuntu).-pURL |--proxy=URLβ Proxy for apt. If you have an apt proxy configured on the local host, the VM will automatically use this; otherwise there is no default. ngl that's kind of a vibe π--cloud-image-url=URLβ URL from where to download the cloud images (default:http://cloud-images.ubuntu.com).-sDISK_SIZE |--disk-size=DISK_SIZEβ Grow downloaded image by this size (default:20G).-oDIR |--output-dir=DIRβ Output directory for generated image (default: current directory).--force-use-cachedβ Use cached image without verifying it against the currently published digests. π«£-qcommand |--qemu-command=commandβ QEMU command to run. This defaults to theqemu-system-*that matches your system architecture.-v|--verboseβ Show VM guest and cloud-init output. we love receipts π--no-apt-upgradeβ Do not runapt-get dist-upgradeduring initialization.--post-command=COMMANDβ Run shell command in the VM after the setup.--metadata=METADATA_FILEβ Use a custom cloud-init metadata file to initialize the cloud image VM.--userdata=USERDATA_FILEβ Use a custom cloud-init userdata file to initialize the cloud image VM.--timeout=SECONDSβ Timeout for cloud-init. Default is 3600 s.--ram-size=MiBβ VM RAM size in MiB. Default is 512 MiB.--cpus=CPUSβ VM number of CPUs. Default is 1.
π CONFIGURATION FILES π
If you use lots of options (and honestly, same), you can put parts of, or the whole command line into a text file, with one line per option. E. g. you can create a file trusty-i386.cfg with contents like
-rtrusty
-ai386
--proxy=http://mysquid.mynetwork
-v
and then run
autopkgtest-buildvm-ubuntu-cloud @trusty-i386.cfg
The contents of the configuration file will be expanded in-place as if you would have given its contents on the command line. π«
β οΈ Please ensure that you don't place spaces between short options and their values, they would become a part of the argument value. no cap, this one bites people fr fr π
π¦ ENVIRONMENT π¦
If the $AUTOPKGTEST_KEEP_APT_SOURCES environment variable is set to a non-empty value, autopkgtest-buildvm-ubuntu-cloud will keep whatever /etc/apt/sources.list was set in the downloaded image.
Otherwise, if the $AUTOPKGTEST_APT_SOURCES_FILE environment variable is set to a non-empty value, for example
AUTOPKGTEST_APT_SOURCES_FILE=/home/me/ubuntu/sources.list
then autopkgtest-buildvm-ubuntu-cloud 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/ubuntu/sources.list)
autopkgtest-buildvm-ubuntu-cloud 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/ubuntu.sources in the virtual machine, rather than /etc/apt/sources.list. plot twist but make it functional π
π SEE ALSO π
autopkgtest-virt-qemu(1), autopkgtest(1), http://cloud-images.ubuntu.com, /usr/share/doc/autopkgtest/. go read, bestie π
π AUTHORS AND COPYRIGHT π
autopkgtest-buildvm-ubuntu-cloud was written by Martin Pitt <martin.pitt@ubuntu.com> β absolute legend, we stan π
This manpage is part of autopkgtest, a tool for testing Debian binary packages. autopkgtest is Copyright (C) 2006-2014 Canonical Ltd and others.
See /usr/share/doc/autopkgtest/CREDITS for the list of contributors and full copying conditions. π
and that's the whole page, bestie!! this lil manual came from the Linux Programmer's Manual, dated 2014, and it's the autopkgtest-buildvm-ubuntu-cloud(1) page β go build some VMs and be the main character of your own test suite πβ¨π¦
π¦ 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