forked from zentralwerk/network
lxc-containers: allow fixed hwaddr
This commit is contained in:
parent
04f28303ec
commit
0d99dc4d56
|
@ -37,6 +37,8 @@ containers:
|
|||
type: veth
|
||||
up1:
|
||||
type: phys
|
||||
# Change (eg. auto-generation) requires reboot of the cable modem
|
||||
hwaddr: 00:23:74:D7:2D:7C
|
||||
|
||||
upstream2:
|
||||
interfaces:
|
||||
|
|
|
@ -14,7 +14,11 @@ lxc.kmsg = 0
|
|||
{%- for net, conf in container['interfaces'].items() %}
|
||||
lxc.network.type={{ conf['type'] }}
|
||||
lxc.network.flags=up
|
||||
{%- if conf.get('hwaddr') %}
|
||||
lxc.network.hwaddr={{ conf['hwaddr'] }}
|
||||
{%- else %}
|
||||
lxc.network.hwaddr={{ hwaddr_prefix }}:{{ n.__str__().rjust(2, '0') }}
|
||||
{%- endif %}
|
||||
{%- if conf['type'] == 'veth' %}
|
||||
lxc.network.veth.pair={{ id }}-{{ net }}
|
||||
{%- endif %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user