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’
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.
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"
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.
sudo systemctl status lxd-bridge
Unit lxd-bridge.service could not be found.
sudo /usr/lib/lxd/lxd-bridge.start
sudo: /usr/lib/lxd/lxd-bridge.start: command not found
This is my main error
Error: Failed preparing container for start: Failed to start device “eth0”: Parent device “lxdbr0” doesn’t exist