lxd #102

Supports: bionic focal


LXD is the new LXC experience. It offers a completely fresh and intuitive user experience with a single command line tool to manage your containers. Containers can be managed over the network in a transparent way through a REST API. It also works with large scale deployments by integrating with OpenStack

Anbox Cloud - LXD

Anbox Cloud offers a software stack that runs Android applications in any cloud enabling high-performance streaming of graphics to desktop and mobile client devices.

At its heart, it uses lightweight container technology instead of full virtual machines to achieve higher density and better performance per host while ensuring security and isolation of each container. Depending on the target platform, payload, and desired application performance (e.g. frame rate), more than 100 containers can be run on a single machine.

For containerization of Android, Anbox Cloud uses the well established and secure container hypervisor LXD. LXD is secure by design, scales to a large number of containers and provides advanced resource management for hosted containers.

Also have a look at the official Anbox Cloud website for more information.

NOTE: Anbox Cloud is a paid offering. You will need a Ubuntu Advantage subscription for this charm to work. You can learn more at https://anbox-cloud.io

WARNING: The Ubuntu Advantage for Infrastructure token every user gets for free for personal use does *NOT work and will result in a failed deployment! You need to use a valid *Ubuntu Advantage for Applications** token to be able to deploy successfully.


The LXD charm is an Anbox Cloud specific charm that provides a LXD cluster for the purpose of running Anbox containers hosting a nested Android instance.

NOTE: This charm is not a generic LXD charm, it only works with Anbox Cloud

$ juju deploy cs:~anbox-charmers/lxd
$ juju config lxd ua_token=<your UA token>
$ juju relate ams-node-controller lxd
$ juju relate ams lxd

For more information about Anbox Cloud, visit the official documentation on https://anbox-cloud.io


(string) The snap channel to install from
(boolean) Enable verbose debugging for LXD
(boolean) Disable the installation of the Anbox Cloud kernel modules. Useful in environments where the kernel modules are not needed (testing) or already part of the installed kernel.
(boolean) Enable support of manual charm upgrade via a Juju action. When the upgrade-charm hook will be executed, the charm will just update itself but not perform any further action. The upgrade then needs to be invoked manually via the upgrade action of the charm. This allows upgrades of individual units rather than upgrading all units together.
(string) Space separated list of extra deb packages to install.
(string) The host/ip to bind the REST service. You can set all interfaces ("[::]") If empty, each node sets its private IP
(int) The port to bind the REST service. Default is 8443
(string) Compression algorithms to be used for images. The supported compression algorithms: bzip2, gzip, lzma, xz or none.
(string) List of signing keys for install_sources package sources, per charmhelpers standard format (a yaml list of strings encoded as a string). The keys should be the full ASCII armoured GPG public keys. While GPG key ids are also supported and looked up on a keyserver, operators should be aware that this mechanism is insecure. null can be used if a standard package signing key is used that will already be installed on the machine, and for PPA sources where the package signing key is securely retrieved from Launchpad.
(string) List of extra apt sources, per charm-helpers standard format (a yaml list of strings encoded as a string). Each source may be either a line that can be added directly to sources.list(5), or in the form ppa:<user>/<ppa-name> for adding Personal Package Archives, or a distribution component to enable.
(string) Used by the nrpe subordinate charms. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: juju-myservice-0 If you're running multiple environments with the same services in them this allows you to differentiate between them.
(string) A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup
(string) The status of service-affecting packages will be set to this value in the dpkg database. Valid values are "install" and "hold".
(string) Identifies which network interface to use for the public address
(boolean) Enable support for shiftfs. This requires an Ubuntu kernel >= 5.0. Shiftfs can dramatically improve container startup times as it makes UID/GID shifts transparent.
(string) How often snapd handles updates for installed snaps. The default (an empty string) is 4x per day. Set to "max" to check once per month based on the charm deployment date. You may also set a custom string as described in the 'refresh.timer' section here: https://forum.snapcraft.io/t/system-options/87
(int) Port where telegraf will listen for metrics to be published, in case it is configured in the same machine as LXD. NOTE - Try to avoid port 8094, because it could be already bound to tcp listener, installed by default in loopback network interface by telegraf charm.
(string) APT source to use instead of the automatic one generated from UA. Overrides UA source if both are set.
(string) Key ID to import to the APT keyring in order to access the specified source archive. Required if ua_source is set.
(string) Ubuntu Advantage token you have received with your license of Anbox Cloud
(boolean) Use staging contracts API service
(boolean) Install prebuilt and signed Nvidia kernel modules if set to true. If false, the charm will use the DKMS based Nvidia kernel module instead. This only applies to x86 based deployments. On Arm the DKMS kernel modules are always installed.