[lxc-users] sticky ethernet device order in container
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Jun 4 15:26:21 UTC 2015
Quoting Janjaap Bos (janjaapbos at gmail.com):
> When using multiple nics in the container, the order sometimes changes
> after a restart.
> So eth0 becomes eth1, vice versa.
That really shouldn't happen. lxc adds the nics in a specific order
(according to the config). Are eth0 and eth1 on different bridges?
Or perhaps I should ask - how do you determine that they've "switched
order"?
> when using LXD, how is this order determined?
> There is no entry for eth0 in the config, since that is a standard lxc
> network device.
> Only the additional network device is added in the container config:
> e.g.
>
> name: c1
> profiles:
> - default
> config:
> raw.lxc: |
> lxc.mount.entry = /var/lib/lxd/lxc/c1/devices/net/tun dev/net/tun none
> bind,create=file 0 0
> lxc.mount.entry = /var/lib/lxd/lxc/c1devices/kvm dev/kvm none
> bind,create=file 0 0
> lxc.mount.entry = /var/lib/lxd/lxc/c1/devices/fuse dev/fuse none
> bind,create=file 0 0
> volatile.baseImage:
> a4066a730e6b3d8021dcc7d0c59f2c37624ffdb60d10f1e09c336e4e1631915c
> volatile.eth0.hwaddr: 00:16:3e:33:3c:c2
> volatile.br0.hwaddr: 00:16:3e:5b:4f:19
> devices:
> br0:
> parent: br0
> type: nic
> ephemeral: false
>
>
> Both nics have a volatile entry (done by lxc or lxd ?)
>
> Sometime after a restart the nics have switched order in the container.
> This of course messes up the network config in the container.
>
> How can I make the eth0 and eth1 order stick?
>
> Thanks for your help!
>
> -Janjaap
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
More information about the lxc-users
mailing list