Get LXD Containers onto the LAN in LXD 2.18

I've been using LXC and LXD for a while now, and was surprised to see that in Ubuntu 17.10, you no longer have to create a static bridge in /etc/network/interfaces and assign it using lxc profile edit default.

Turns out the new way to do it, after much googling, is to simply assign a bridge of a physical interface to your default template, and it handles it using the macvtap driver from there.

E.g. my LAN is connected to enp3s0:

lxc network attach-profile enp3s0 default eth0 eth0

Source: https://github.com/lxc/lxd/issues/3972

Published