Header RSS Feed
 
If you only want to see the articles of a certain category, please click on the desired category below:
ALL Android Backup BSD Database Hacks Hardware Internet Linux Mail MySQL Monitoring Network Personal PHP Proxy Shell Solaris Unix Virtualization VMware Windows Wyse

Disable autostart of lxcbr0 on Ubuntu 16.04 xenial
Friday - Apr 22nd 2016 - by - (1 comments)

One of the major changes on Ubuntu 16.04 (Xenial) is the integration of LXD using LXC 2.0 in the background.
Although I love LXC, I'm kind of annoyed by the fact, that it comes as part of the "base" installation. If I want LXD/LXC, I install it manually. 

Because LXD is now installed by default, the LXC bridge (lxcbr0) is now started automatically:

root@xenial:~# ifconfig
ens160    Link encap:Ethernet  HWaddr 00:50:56:99:37:c4 
          inet addr:10.10.10.10  Bcast:10.10.10.255  Mask:255.255.255.0
          inet6 addr: fe80::250:56ff:fe99:37c4/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:918 errors:0 dropped:1 overruns:0 frame:0
          TX packets:441 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:78692 (78.6 KB)  TX bytes:92428 (92.4 KB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lxcbr0    Link encap:Ethernet  HWaddr 86:dc:ff:84:80:20 
          inet addr:10.0.3.1  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: fe80::84dc:ffff:fe84:8020/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:570 (570.0 B)

To disable the automatic start of the virtual bridge lxcbr0, adapt /etc/default/lxc-net and set USE_LXC_BRIDGE to false:

root@xenial:~# sed -i "/USE_LXC_BRIDGE/s/true/false/g" /etc/default/lxc-net

This disables the automatic start of the virtual bridge at boot time.

To turn off and delete the bridge during runtime:

root@xenial:~# ifconfig lxcbr0 down
root@xenial:~# brctl delbr lxcbr0

 

Add a comment

Show form to leave a comment

Comments (newest first):

Fjor wrote on May 20th, 2016:
I couldn't disable the bridge at start using the /etc/default config. In systemd those configs are deprecated. I resolved the issue stopping LXD services in /etc/rc.local with:

service lxd stop

service lxcfs stop

The bridge will be disabled too.


Go to Homepage home
Linux Howtos how to's
Monitoring Plugins monitoring plugins
Links links

Valid HTML 4.01 Transitional
Valid CSS!
[Valid RSS]

6939 Days
until Death of Computers
Why?