autopkgtest-virt-lxc(1)

πŸ“¦
version 6.0 Β· 2 versions
, in debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– 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 of lxc-start-ephemeral to 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 the overlayfs filesystem as used by lxc-start-ephemeral not being completely transparent (e. g. seen with tar failing 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 β€” run lxc-* commands through sudo. 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 ✨

autopkgtest does not run apt-get update at the start of a package build, which can cause a build failure if you are using a development release template. you will need to run apt-get update in 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/.


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 πŸ’–βœ¨πŸŽ€