Table of Contents

LXC - Profiles - Profiles - Create a Bridge Profile

lxc profile create bridgeprofile

Edit

lxc profile edit bridgeprofile

Edit as follows:

config: {}
description: Bridged networking LXD profile
devices:
  eth0:
    name: eth0
    nictype: bridged
    parent: br0
    type: nic
name: bridgeprofile
used_by: []

Show the profile

lxc profile show bridgeprofile

To assign the profile to a container

lxc profile assign containername default,bridgeprofile

NOTE: The default profile must also be assigned as shown.


IMPORTANT: To allow bridging to work with LXC, check these files and ensure that bridging is allowed.

/etc/default/lxc
/etc/default/lxc-net

Set USE_LXC_BRIDGE=“true”.