Add second IP to LXC container?

vispa

Well-Known Member
Feb 20, 2016
34
0
46
44
Hi All,

I've had a good look around the forum and I can't seem to get this to work. I'm trying to add a second IP (alias) to eth0 on my centos 7 container.

I've tried a few ways but to no avail. I I try the config below, the container won't start?

Any help would be appreciated.

------
arch: amd64
cores: 4
hostname: xxxx.net.uk
memory: 512
nameserver: 8.8.4.4
net0: name=eth0,bridge=vmbr0,gw=62.xx.xxx.1,hwaddr=56:74:73:07:44:B4,ip=62.xx.xxx.9/24,type=veth
net5: name=eth0,bridge=vmbr0,hwaddr=E2:B6:8C:62:79:76,ip=83.xxx.xxx.9/24,type=veth
ostype: centos
rootfs: ceph-lxc:vm-103-disk-1,size=8G
searchdomain: 8.8.8.8
swap: 512
------
 
both interface have the same name, eth0.

you eth0 and eth1.