autopkgtest-virt-lxd, autopkgtest-virt-incus - autopkgtest virtualisation server using LXD/Incus
Contents
Description
autopkgtest-virt-lxd provides an autopkgtest virtualisation server using LXD or Incus. It creates
temporary containers from the given LXD/Incus image name.
Normally autopkgtest-virt-lxd will be invoked by autopkgtest.
Example
(If using Incus rather than LXD, substitute incus for each of lxc and lxd in the following examples.)
Show available images on the standard linuxcontainers.org remote image server:
lxc image list images:
Run the tests of a local built directory tree on the current Debian sid image from the above images:
remote:
autopkgtest my-package/ -- lxd images:debian/sid/amd64
Run the tests in a local built directory tree from a local LXD image desktop/i386, ensuring that
eatmydata is installed:
autopkgtest --setup-commands 'apt-get install -y eatmydata' dir/to/test/ \
-- lxd desktop/i386
Run the tests of the gdk-pixbuf package on the current Debian sid image from the images: remote on a
remote armhf host:
lxc remote add armhf-test http://armhf.testlab.example.com:8443
autopkgtest --setup-commands=setup-testbed gdk-pixbuf -- \
lxd --remote armhf-test images:debian/sid/armhf
Build a local image with standard setup commands pre-applied from a remote standard image, and run
gdk-pixbuf test in it:
autopkgtest-build-lxd images:ubuntu/xenial/amd64
autopkgtest gdk-pixbuf -- lxd autopkgtest/ubuntu/xenial/amd64
Input, Output And Exit Status
The behaviour of autopkgtest-virt-lxd is as described by the AutomatedTesting virtualisation regime
specification.
Name
autopkgtest-virt-lxd, autopkgtest-virt-incus - autopkgtest virtualisation server using LXD/Incus
Options
--lxd Use LXD. This is the default when invoked as autopkgtest-virt-lxd.
--incus
Use Incus. This is the default when invoked as autopkgtest-virt-incus.
-rremote|--remote=remote
Run container on given remote host instead of locally. See lxcremotelist or incusremotelist
for available remotes.
--vm Use a VM instead of a container.
-d | --debug
Enables debugging output.
You can pass additional options to lxclaunch or incuslaunch: Anything after a -- gets appended verbatim
to lxclaunchimage or incuslaunchimage.
Requirements
When run as autopkgtest-virt-lxd or with the --lxd option, LXD is used. When run as
autopkgtest-virt-incus or with the --incus option, Incus is used.
autopkgtest-virt-lxd makes no strict assumptions about the image. However, it is highly recommended that
the image has eatmydata installed, or at least that gets installed via setup commands.
For production use, it is recommended to use autopkgtest-build-lxd(1) or autopkgtest-build-incus(1) to
generate an optimized image with autopkgtest's standard setup commands applied. Then these setup commands
don't need to be applied for every test. This is particularly necessary if you want to use --apt-source
tests, i. e. use apt-getsource in the test bed to download the package to test. Standard images from
linuxcontainers.org do not have "deb-src" apt sources by default.
See Also
autopkgtest(1), autopkgtest-build-lxd(1), /usr/share/doc/autopkgtest/.
Synopsis
autopkgtest[...]--lxd [options] image [--extralxclaunchargs...]
autopkgtest[...]--incus [options] image [--extraincuslaunchargs...]
