autopkgtest-virt-lxc(1) | General Commands Manual | autopkgtest-virt-lxc(1) |
autopkgtest-virt-lxc - autopkgtest virtualisation server using LXC
autopkgtest [...] -- lxc [options] lxc-container [-- extra lxc-start args...]
autopkgtest-virt-lxc provides an autopkgtest virtualisation server using LXC. It adapts the raw functionality provided by the lxc-* tools for use by autopkgtest.
Normally autopkgtest-virt-lxc will be invoked by autopkgtest.
You can conveniently create a suitable container using the autopkgtest-build-lxc(1) script.
autopkgtest-virt-lxc assumes that you have already prepared a suitable Debian based LXC container. See lxc-create(1) for how to create containers, and particularly autopkgtest-build-lxc(1) for conveniently creating standard autopkgtest containers.
This can be used to dramatically improve performance, although 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.
Note that ephemeral containers do not support rebooting with LXC 1.x. This does work with LXC >= 2.x.
You can pass additional options to LXC: Anything after a -- gets passed verbatim to lxc-start/lxc-start-ephemeral.
The behaviour of autopkgtest-virt-lxc is as described by the AutomatedTesting virtualisation regime specification.
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).
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
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>.
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.
2013 | Linux Programmer's Manual |