Failed to create network 'lxdbr0': Failed to automatically find an unused IPv4 subnet, manual configuration required

Can anyone help me resolve this issue/ show me the steps to manually configure lxd network?

I’d like to assign eth0 to a container and assign eth1 to a separate container, both accessible from the outside world with their static ipv4.

root@gb7:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:25:90:db:b0:0f
inet addr:10.4.34.94 Bcast:10.4.34.95 Mask:255.255.255.252
inet6 addr: fe80::225:90ff:fedb:b00f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:15150 errors:0 dropped:0 overruns:0 frame:0
TX packets:15072 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:972032 (972.0 KB) TX bytes:964776 (964.7 KB)
Interrupt:20 Memory:f7200000-f7220000

eth1 Link encap:Ethernet HWaddr 00:25:90:db:b0:0e
inet addr:69.162.74.178 Bcast:69.162.74.179 Mask:255.255.255.252
inet6 addr: fe80::225:90ff:fedb:b00e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3560842 errors:0 dropped:0 overruns:0 frame:0
TX packets:2572855 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:335878527 (335.8 MB) TX bytes:555230397 (555.2 MB)
Memory:f7100000-f717ffff

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:205 errors:0 dropped:0 overruns:0 frame:0
TX packets:205 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:35465 (35.4 KB) TX bytes:35465 (35.4 KB)

You can dedicate a NIC network interface card to a specific LXD container, using nic=physical.
See, for example, Second NIC inside lxd

Of course, you cannot dedicate eth0 to a container unless you are happy with the host losing network connectivity (LXD would not work).

You can also use macvlan interfaces, one for each of eth0 and eth1, and have containers to connect through either and get a DHCP lease from the network. If you really want static IPs, you can do that as well. I describe that in my tutorials, or you can search in this forum as well.

The error message in the title is probably something else, either the NIC is not configured or it has a netmask of 10.255.255.255.

So, which would be the best method for me to create containers and assign a host interface to said container?
Additional interfaces on the machine will be labeled with eth(1,2,3,4,4,5,6), i.e. 6 containers

I’ve managed to create containers and use iptables to forward traffic but haven’t found a way to bind a host interface to a container and allow the container to contact the outside world.