When I run lxd init I choose this setting.
Would you like to create a new network bridge (yes/no)? no
because I created my own br0 in /etc/network/interfaces
source /etc/network/interfaces.d/*
auto lo
iface lo inet loopback
auto br0
iface br0 inet static
address x.x.50.2
netmask 255.255.252.0
broadcast x.x.x.255
network x.x.x.0
gateway x.x.53.254
dns-nameservers 8.8.8.8
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
iface eth0 inet manual
Then I launch lxd centos and run
lxc config device add first eth0 nic nictype=bridged parent=br0
lxc config device set first eth0 ipv4.address x.x.51.2
lxc config device set first eth0 security.mac_filtering true
and change configuration in
/var/lib/lxd/containers/second/rootfs/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
HOSTNAME=LXC_NAME
NM_CONTROLLED=no
TYPE=Ethernet
IPADDR=x.x.51.2
NETMASK=255.255.255.255
GATEWAY=x.x.53.254
DNS1=8.8.8.8
DNS2=x.x.x.x
MTU=
DHCP_HOSTNAME=x.x.50.2
When I try ping 8.8.8.8 I get Connection: Network is Unreachable
/etc/resolv.conf
nameserver 8.8.8.8
search lxd
nameserver x.x.x.x
What am I doing wrong I cannot figure out, maybe I'm missing some conception?