autopkgtest-virt-lxc(1)
π autopkgtest-virt-lxc(1) β the General Commands Manual girlie π
okay so bestie, sit down, hydrate, and let me tell you about autopkgtest-virt-lxc β it's a virtualisation server for autopkgtest that runs on LXC. no cap.
β¨ NAME β¨
autopkgtest-virt-lxc β the autopkgtest virtualisation server that's built on LXC. it's giving container energy fr fr π«Ά
β¨ SYNOPSIS β¨
autopkgtest [...] -- lxc [options] lxc-container [-- extra lxc-start
args...]
β¨ DESCRIPTION β¨
so autopkgtest-virt-lxc provides an autopkgtest virtualisation server using LXC. it literally takes the raw functionality that the lxc-* tools hand over and adapts it so autopkgtest can actually use it. glow-up of the century tbh π
normally you're not even calling this yourself β autopkgtest-virt-lxc gets invoked by autopkgtest. it's the background character that's secretly the main character, iykyk.
and hiiii, if you want a suitable container made for you with zero stress, you can conveniently create one using the autopkgtest-build-lxc(1) script. obsessed. β¨
β¨ REQUIREMENTS β¨
okay so real talk: autopkgtest-virt-lxc assumes you've already prepared a suitable Debian based LXC container. like, it's not gonna do that part for you, bestie. see lxc-create(1) for how to create containers, and especially autopkgtest-build-lxc(1) if you want to conveniently create standard autopkgtest containers. do the prep work, it's worth it π
β¨ OPTIONS β¨
-e|--ephemeralβ this one makes use oflxc-start-ephemeralto create temporary container overlays, instead of the default behaviour of cloning your containers.
it can dramatically improve performance, but you may see issues due to theoverlayfsfilesystem as used bylxc-start-ephemeralnot being completely transparent (e. g. seen withtarfailing when running LXC within Qemu). before using this option in automation you should ensure that tests that involve large I/O work as expected. like, test the vibe first, okay? π
also note that ephemeral containers do not support rebooting with LXC 1.x. this does work with LXC >= 2.x. so check your version, bestie.
-s|--sudoβ runlxc-*commands throughsudo. use this option if you run autopkgtest as a normal user, but need to run the container itself as root (if you use LXC system level containers). permission sliiip π--name NAMEβ set a custom name for the temporary container in which to run the test. this is autogenerated by default (autopkgtest-lxc-XXXXXX), but if you have a way to generate more expressive unique names you can use that to make it easier to map containers to running tests. name your children, periodt π--disk-limit SIZEβ limits the amount of disk space that the test container is allowed to use for its root filesystem. when this option is used, then the test container will be backed by a loop device of the given SIZE, and it won't be possible for the container to consume all of the disk space in the host machine. boundaries?? in this economy?? πΈ-d|--debugβ enables debugging output. for when you need to see everything, no secrets π¦
and one more thing, bestie: you can pass additional options to LXC β anything after a -- gets passed verbatim to lxc-start/lxc-start-ephemeral. verbatim. character for character. it's not even editing, it's just forwarding π
β¨ INPUT, OUTPUT AND EXIT STATUS β¨
the behaviour of autopkgtest-virt-lxc is as described by the AutomatedTesting virtualisation regime specification. that's the canon, we don't argue with canon.
β¨ NOTES β¨
autopkgtestdoes not runapt-get updateat the start of a package build, which can cause a build failure if you are using a development release template. you will need to runapt-get updatein the template yourself (e. g. using--setup-commands). yes this is annoying. yes you still have to do it π
β¨ EXAMPLE β¨
create a suitable debootstrap-based container for Debian or Ubuntu template, e. g. a Debian sid one (will be named autopkgtest-sid):
autopkgtest-build-lxc debian sid
or an Ubuntu one based on the cloud images (faster than autopkgtest-build-lxc's "ubuntu" template with debootstrap, but much bigger):
lxc-create -t ubuntu-cloud -n autopkgtest-trusty -- -r trusty -d daily
run tests against hello_2.8-4.dsc, using the LXC container autopkgtest-sid, and with an ephemeral overlay for speed:
autopkgtest hello_2.8-4.dsc -- lxc -e autopkgtest-sid
see?? that last one is the whole vibe. fast. clean. slay. π₯
β¨ SEE ALSO β¨
autopkgtest(1), autopkgtest-build-lxc(1), lxc-create(1), /usr/share/doc/autopkgtest/.
β¨ AUTHORS AND COPYRIGHT β¨
autopkgtest-virt-lxc was written by Robie Basak <robie.basak@canonical.com> and Martin Pitt <martin.pitt@ubuntu.com>. legends, honestly π«Ά
this manpage is part of autopkgtest, a tool for testing Debian binary packages. autopkgtest is Copyright (C) 2006-2013 Canonical Ltd and others.
see /usr/share/doc/autopkgtest/CREDITS for the list of contributors and full copying conditions. read the receipts, bestie π
okay that's the whole page!! this one's from the Linux Programmer's Manual, dated 2013, and it's autopkgtest-virt-lxc(1) β go forth and containerise responsibly, mwah πβ¨π
π¦ 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.34ubuntu2 Β· 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