Hi,
after the little problem I had in an OVH server with the default IP assignment way for LXC containers in latest Proxmox, they gave me a working temporary (I hope it's) solution, that basically is to only create the NIC from the Proxmox GUI, and configure the IP addresses from within the container. Sadly, that carries another problem with it (at least with an Ubuntu 14.04 container based in the default template downloaded from the GUI):
You can't ifdown/ifup alias interfaces. I'm specially worried about it because I have an address that have a routing problem (happens in OVH sometimes when moving between servers an IP with a vMAC assigned) and I can't "shut it down" without shutting down the whole container, that has 14 addresses..
I've tried to configure the IPs both ways (neither work):
and
Both give this when trying to ifup/ifdown:
Thanks in advance, hopefully this can help to fix it, I'm voluntary to any test (I have some free IPs) if it does not imply main container downtime.
Best regards!
after the little problem I had in an OVH server with the default IP assignment way for LXC containers in latest Proxmox, they gave me a working temporary (I hope it's) solution, that basically is to only create the NIC from the Proxmox GUI, and configure the IP addresses from within the container. Sadly, that carries another problem with it (at least with an Ubuntu 14.04 container based in the default template downloaded from the GUI):
You can't ifdown/ifup alias interfaces. I'm specially worried about it because I have an address that have a routing problem (happens in OVH sometimes when moving between servers an IP with a vMAC assigned) and I can't "shut it down" without shutting down the whole container, that has 14 addresses..
I've tried to configure the IPs both ways (neither work):
Code:
auto lo eth0
iface lo inet loopback
iface eth0 inet static
address MAIN_VM_IP
netmask 255.255.255.255
broadcast MAIN_VM_IP
post-up route add FIRST_3_OCTECTS_OF_HOST_IP.254 dev eth0
post-up route add default gw FIRST_3_OCTECTS_OF_HOST_IP.254
pre-down route del FIRST_3_OCTECTS_OF_HOST_IP.254 dev eth0
pre-down route del default gw FIRST_3_OCTECTS_OF_HOST_IP.254
post-up /sbin/ifconfig eth0:0 SECONDARY_VM_IP netmask 255.255.255.255 broadcast SECONDARY_VM_IP
post-down /sbin/ifconfig eth0:0 down
post-up /sbin/ifconfig eth0:1 SECONDARY_VM_IP netmask 255.255.255.255 broadcast SECONDARY_VM_IP
post-down /sbin/ifconfig eth0:1 down
...
and
Code:
auto lo eth0 eth0:0 eth0:1 eth0:2 eth0:3 eth0:4 eth0:5 eth0:6 eth0:7 eth0:8 eth0:9 eth0:10 eth0:11 eth0:12 eth0:13
iface lo inet loopback
iface eth0 inet static
address MAIN_VM_IP
netmask 255.255.255.255
broadcast MAIN_VM_IP
post-up route add FIRST_3_OCTECTS_OF_HOST_IP.254 dev eth0
post-up route add default gw FIRST_3_OCTECTS_OF_HOST_IP.254
pre-down route del FIRST_3_OCTECTS_OF_HOST_IP.254 dev eth0
pre-down route del default gw FIRST_3_OCTECTS_OF_HOST_IP.254
iface eth0:0 inet static
address SECONDARY_VM_IP
netmask 255.255.255.255
iface eth0:1 inet static
address SECONDARY_VM_IP
netmask 255.255.255.255
...
Both give this when trying to ifup/ifdown:
Code:
root@hostname:~# ifup eth0:0
Ignoring unknown interface eth0:0=eth0:0.
root@hostname:~# ifdown eth0:0
ifdown: interface eth0:0 not configured
root@hostname:~# ifup eth0:1
Ignoring unknown interface eth0:1=eth0:1.
root@hostname:~# ifdown eth0:1
ifdown: interface eth0:1 not configured
root@hostname:~# [B]service networking restart[/B]
stop: Job failed while stopping
start: Job is already running: networking
Thanks in advance, hopefully this can help to fix it, I'm voluntary to any test (I have some free IPs) if it does not imply main container downtime.
Best regards!