IPV4 Address not getting assigned to container with non eth0 interfaces (i.e. eth1, eth2 etc...)


(HSB) #1

I am trying to create a container with non-default profile, but, for some reason, IP Address is not getting assigned when I use anything other than eth0

LXD: 3.0.1 on Ubuntu Bionic Host

Thoughts what issue might be?

####### Dev Profile dev-profile-0
config: {}
description: LXD Profile for node 0
devices:
  eth2:
    ipv4.address: 10.110.110.200
    name: eth2
    nictype: bridged
    parent: dev-br1
    type: nic
  root:
    path: /
    pool: default
    type: disk
name: dev-profile-0
used_by:
- /1.0/containers/dev-node-0

############### Network dev-br1 (eth2)
config:
  ipv4.address: 10.110.110.1/24
  ipv4.nat: "true"
  ipv6.address: none
description: LXD Network dev-br1
name: dev-br1
type: bridge
used_by:
- /1.0/containers/dev-node-0
managed: true
status: Created
locations:
- none

################ Network lxdbr0 (eth0)

config:
  ipv4.address: 10.10.10.1/24
  ipv4.nat: "true"
  ipv6.address: none
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/containers/demo-node-0
- /1.0/containers/demo-node-1
- /1.0/containers/demo-node-2
- /1.0/containers/demo-node-3
managed: true
status: Created
locations:
- none


########## dev-node-0 container info
Name: dev-node-0
Remote: unix://
Architecture: x86_64
Created: 2018/07/11 15:41 UTC
Status: Running
Type: persistent
Profiles: dev-common, dev-profile-0
Pid: 13600
Ips:
  eth2:	inet6	fe80::216:3eff:fe73:e4ee	vethVONJOY
  lo:	inet	127.0.0.1
  lo:	inet6	::1
Resources:
  Processes: 35
  CPU usage:
    CPU usage (in seconds): 13
  Memory usage:
    Memory (current): 367.34MB
    Memory (peak): 416.43MB
  Network usage:
    eth2:
      Bytes received: 15.42kB
      Bytes sent: 1.13kB
      Packets received: 103
      Packets sent: 14
    lo:
      Bytes received: 10.93kB
      Bytes sent: 10.93kB
      Packets received: 160
      Packets sent: 160
    tunl0:
      Bytes received: 0B
      Bytes sent: 0B
      Packets received: 0
      Packets sent: 0

################# ifconfig -a (dev-node-0)
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::216:3eff:fe73:e4ee  prefixlen 64  scopeid 0x20<link>
        ether 00:16:3e:73:e4:ee  txqueuelen 1000  (Ethernet)
        RX packets 108  bytes 16714 (16.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 14  bytes 1156 (1.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 160  bytes 11192 (11.1 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 160  bytes 11192 (11.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

tunl0: flags=128<NOARP>  mtu 1480
        tunnel   txqueuelen 1000  (IPIP Tunnel)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0