Can I add a LXD container on Ubuntu MAAS

just a question… I’d like to adding and manage my LXD containers with MAAS, is there a way to make that without use KVM or it’s necessary use that inside the container?

I’m making a lab env based just with LXD, MAAS has been installed on a container and I’d like to add the nodes created as container on it. Is it possible that?

thanks in advance

I’m interested in this too. I see when Juju brings up a container on a MaaS deployed machine, the container becomes visible and known on the gui, but there’s no obvious way to do this without Juju

MAAS currently doesn’t have LXD container support. There has been some talk about potentially doing this in the future. Something that may be of interest to you is that we are currently working on LXD VM support, where you would be able to add a LXD Pod in a similar vein to KVM Pods.

4 Likes

it’s a beta but the way is right :slight_smile:

MAAS ver 2.8 (info)

There’s no magic there particularly.

Juju uses MAAS API to register a Device with a parent

$ maas $PROFILE devices create --help
usage: maas $PROFILE devices create [--help] [-d] [-k] [data [data ...]]

Create a new device


This method accepts keyword arguments.  Pass each argument as a
key-value pair with an equals sign between the key and the value:
key1=value1 key2=value key3=value3.  Keyword arguments must come after
any positional arguments.

Create a new device.

:param hostname: Optional.  A hostname. If not given,
one will be generated.
:type hostname: String

 :param description: Optional.  A optional description.
:type description: String

 :param domain: Optional.  The domain of the device. If
not given the default domain is used.
:type domain: String

 :param mac_addresses: Required.  One or more MAC
addresses for the device.
:type mac_addresses: String

 :param parent: Optional.  The system id of the parent.
:type parent: String

When you lxd init you can optionally choose to register devices against a MAAS, which again uses this API.

1 Like