Best practice in giving lxd containers routable IP addresses

Jeff Pihach jeff.pihach at canonical.com
Mon Jun 12 16:46:28 UTC 2017


Hi Daniel,

When going through the network setup for lxd as outlined[0] in the
"Walkthrough of network configuration" section. You can set the "Bridge
interface name" to the primary interface on the host. Your lxc profile
should look as follows, where "br0" is the interface name of the host.

```
$ lxc profile show default
config: {}
description: Default LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
name: default
```

Now whenever I create new containers they are assigned an IP on the
network. You'll then want to add your ssh-key to the authorized_keys on the
container to be able to ssh in.

Hope this helps!

[0] https://jujucharms.com/docs/stable/tut-lxd

On Mon, Jun 12, 2017 at 10:08 AM, Daniel Bidwell <drbidwell at gmail.com>
wrote:

> What is the best practice in giving lxd containers routable IP
> addresses?  I would like to treat the containers as regular vm's for
> production, not as non-routable devops machines.  Is there a document
> somewhere show how to configure this?
> --
> Daniel Bidwell <drbidwell at gmail.com>
>
>
> --
> Juju mailing list
> Juju at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/
> mailman/listinfo/juju
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/juju/attachments/20170612/f8d38a6b/attachment.html>


More information about the Juju mailing list