User Tools

Site Tools


lxc:profiles:profiles:create_a_bridge_profile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lxc:profiles:profiles:create_a_bridge_profile [2021/01/07 16:23] – created peterlxc:profiles:profiles:create_a_bridge_profile [2021/01/07 18:32] (current) – [To assign the profile to a container] peter
Line 1: Line 1:
 ====== LXC - Profiles - Profiles - Create a Bridge Profile ====== ====== LXC - Profiles - Profiles - Create a Bridge Profile ======
 +
 +<code bash>
 +lxc profile create bridgeprofile
 +</code>
 +
 +
 +
 +===== Edit =====
 +
 +<code bash>
 +lxc profile edit bridgeprofile
 +</code>
 +
 +Edit as follows:
 +
 +<code bash>
 +config: {}
 +description: Bridged networking LXD profile
 +devices:
 +  eth0:
 +    name: eth0
 +    nictype: bridged
 +    parent: br0
 +    type: nic
 +name: bridgeprofile
 +used_by: []
 +</code>
 +
 +----
 +
 +===== Show the profile =====
 +
 +<code bash>
 +lxc profile show bridgeprofile
 +</code>
 +
 +----
 +
 +===== To assign the profile to a container =====
 +
 +<code bash>
 +lxc profile assign containername default,bridgeprofile
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  The **default** profile must also be assigned as shown.
 +</WRAP>
 +
 +----
 +
 +<WRAP important>
 +**IMPORTANT:**  To allow bridging to work with LXC, check these files and ensure that bridging is allowed.
 +
 +<code bash>
 +/etc/default/lxc
 +/etc/default/lxc-net
 +</code>
 +
 +Set **USE_LXC_BRIDGE="true"**.
 +
 +</WRAP>
  
lxc/profiles/profiles/create_a_bridge_profile.1610036626.txt.gz · Last modified: 2021/01/07 16:23 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki