[lxc-users] sticky ethernet device order in container
Janjaap Bos
janjaapbos at gmail.com
Mon Jun 1 21:53:03 UTC 2015
When using multiple nics in the container, the order sometimes changes
after a restart.
So eth0 becomes eth1, vice versa.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150601/f5e16ef1/attachment.html>
More information about the lxc-users
mailing list