Missing parent 'lxdbr0' for nic 'eth0'


#1

Novice here - trying to set up some containers
ubuntu 16.04 LTS
installed lxd and ran lxd init
Tried creating my first container using
lxc launch ubuntu:x c1

The container seemed to create OK, I can see it in the list but won’t start. Get the following
error: Missing parent ‘lxdbr0’ for nic ‘eth0’


(Stéphane Graber) #2

Ok, so that’s likely LXD 2.0.11 then. The most usual explanation for this error in this case is that you’ve got some kind of port conflict on port 53 (DNS).

Can you paste the output of sudo netstat -lnp? My guess would be that you have bind9 installed (named) and that it’s binding all interfaces and preventing the lxd bridge from starting.


#3

I see 10.0.3.1 and the loop back tied to port 53. 10.0.3.1 is the IP of lxcbr0 wjen I run netstat

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 10.0.3.1:53 0.0.0.0:* LISTEN 3164/dnsmasq
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 2481/dnsmasq
tcp 0 0 127.0.0.1:3350 0.0.0.0:* LISTEN 3136/xrdp-sesman
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 2321/sshd
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1754/cupsd
tcp 0 0 0.0.0.0:3389 0.0.0.0:* LISTEN 3118/xrdp
tcp6 0 0 :::22 :::* LISTEN 2321/sshd
tcp6 0 0 ::1:631 :::* LISTEN 1754/cupsd
udp 0 0 0.0.0.0:51037 0.0.0.0:* 2481/dnsmasq
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2612/avahi-daemon:
udp 0 0 10.0.3.1:53 0.0.0.0:* 3164/dnsmasq
udp 0 0 127.0.1.1:53 0.0.0.0:* 2481/dnsmasq
udp 0 0 0.0.0.0:67 0.0.0.0:* 3164/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 2468/dhclient
udp 0 0 130.20.142.241:123 0.0.0.0:* 3261/ntpd
udp 0 0 127.0.0.1:123 0.0.0.0:* 3261/ntpd
udp 0 0 0.0.0.0:123 0.0.0.0:* 3261/ntpd
udp 0 0 0.0.0.0:49394 0.0.0.0:* 2612/avahi-daemon:
udp 0 0 0.0.0.0:631 0.0.0.0:* 1933/cups-browsed
udp6 0 0 :::51112 :::* 2612/avahi-daemon:
udp6 0 0 :::5353 :::* 2612/avahi-daemon:
udp6 0 0 fe80::6cc5:c888:5b8:123 :::* 3261/ntpd
udp6 0 0 ::1:123 :::* 3261/ntpd
udp6 0 0 :::123 :::* 3261/ntpd
raw6 0 0 :::58 :::* 7 1932/NetworkManager
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 14919 1/init /var/lib/lxd/unix.socket
unix 2 [ ACC ] STREAM LISTENING 30894 4086/lxd /var/lib/lxd/devlxd/sock
unix 2 [ ACC ] STREAM LISTENING 28074 3229/systemd /run/user/1000/systemd/private
unix 2 [ ACC ] STREAM LISTENING 15342 2418/systemd /run/user/108/systemd/private
unix 2 [ ACC ] SEQPACKET LISTENING 17764 1/init /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 20913 2320/Xorg /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 26177 2846/pulseaudio /run/user/108/pulse/native
unix 2 [ ACC ] STREAM LISTENING 20912 2320/Xorg @/tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 17736 1/init /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 17745 1/init /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 17760 1/init /run/systemd/fsck.progress
unix 2 [ ACC ] STREAM LISTENING 22414 2731/upstart @/com/ubuntu/upstart-session/108/2731
unix 2 [ ACC ] STREAM LISTENING 14921 1/init /run/snapd-snap.socket
unix 2 [ ACC ] STREAM LISTENING 14922 1/init /run/uuidd/request
unix 2 [ ACC ] STREAM LISTENING 14920 1/init /run/snapd.socket
unix 2 [ ACC ] STREAM LISTENING 14923 1/init /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 14924 1/init /var/run/avahi-daemon/socket
unix 2 [ ACC ] STREAM LISTENING 14927 1/init /run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 14928 1/init /var/run/cups/cups.sock
unix 2 [ ACC ] STREAM LISTENING 20068 2456/dbus-daemon @/tmp/dbus-0SagybF80w
unix 2 [ ACC ] STREAM LISTENING 23831 1932/NetworkManager /var/run/NetworkManager/private-dhcp
unix 2 [ ACC ] STREAM LISTENING 25709 2464/dbus-daemon @/tmp/dbus-1hqJtKGRMX


(Stéphane Graber) #4

Ok, so that’s not the usual conflict.

Can you paste the output of sudo systemctl status lxd-bridge and the output of sudo /usr/lib/lxd/lxd-bridge.start ?


#5
# systemctl status lxd-bridge
● lxd-bridge.service - LXD - network bridge
   Loaded: loaded (/lib/systemd/system/lxd-bridge.service; static; vendor preset: enabled)
   Active: active (exited) since Tue 2018-04-10 14:39:09 PDT; 24h ago
     Docs: man:lxd(1)
  Process: 4051 ExecStart=/usr/lib/lxd/lxd-bridge.start (code=exited, status=0/SUCCESS)
 Main PID: 4051 (code=exited, status=0/SUCCESS)
    Tasks: 0
   Memory: 0B
      CPU: 0
   CGroup: /system.slice/lxd-bridge.service

Apr 10 14:39:09 xxx systemd[1]: Starting LXD - network bridge...
Apr 10 14:39:09 xxx systemd[1]: Started LXD - network bridge.

running /usr/lib/lxd/lxd-bridge.start returned no output


(Stéphane Graber) #6

And you don’t have lxdbr0 interface after that?

What’s in your /etc/default/lxd-bridge?


#7

when I run ifconfig I see lxcbr0
lxcbr0 Link encap:Ethernet HWaddr 00:16:3e:00:00:00
inet addr:10.0.3.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 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:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Here is what is in /etc/default/lxd-bridge

# This is still used even if USE_LXD_BRIDGE is set to false
# set to an empty value to fully disable
LXD_BRIDGE=""

# Update the "default" LXD profile
UPDATE_PROFILE="true"

# Path to an extra dnsmasq configuration file
LXD_CONFILE=""

# DNS domain for the bridge
LXD_DOMAIN="lxd"

# IPv4
## IPv4 address (e.g. 10.0.8.1)
LXD_IPV4_ADDR=""

## IPv4 netmask (e.g. 255.255.255.0)
LXD_IPV4_NETMASK=""

## IPv4 network (e.g. 10.0.8.0/24)
LXD_IPV4_NETWORK=""

## IPv4 DHCP range (e.g. 10.0.8.2,10.0.8.254)
LXD_IPV4_DHCP_RANGE=""

## IPv4 DHCP number of hosts (e.g. 250)
LXD_IPV4_DHCP_MAX=""

## NAT IPv4 traffic
LXD_IPV4_NAT="true"

# IPv6
## IPv6 address (e.g. 2001:470:b368:4242::1)
LXD_IPV6_ADDR=""

## IPv6 CIDR mask (e.g. 64)
LXD_IPV6_MASK=""

## IPv6 network (e.g. 2001:470:b368:4242::/64)
LXD_IPV6_NETWORK=""

## NAT IPv6 traffic
LXD_IPV6_NAT="false"

# Run a minimal HTTP PROXY server
LXD_IPV6_PROXY="true"

(Stéphane Graber) #8

Thanks, that makes things much clearer. The problem is confusion between lxcbr0 and lxdbr0.

The former exists on your system and is configured through lxc-net, the latter is disabled in the config file you pasted above.

LXD is looking for lxdbr0, not for lxcbr0, causing the error.

To make LXD use your existing lxcbr0 bridge instead of its expected lxdbr0 one, you should just run lxc profile edit default and then replace lxdbr0 by lxcbr0 in the configuration, saving the result should then make things work.

An alternative would be to discontinue the use of your old lxcbr0 bridge on this system, and re-enable lxdbr0 through dpkg-reconfigure -p medium lxd, in which case you wouldn’t need to change the default profile.