[Openstack] Multi-NIC instance is only configuring one interface

Antonio Messina antonio.s.messina at gmail.com
Thu Mar 27 07:36:38 UTC 2014


On Wed, Mar 26, 2014 at 11:11 PM, Joseph Breu <breu at breu.org> wrote:
> That's normal behavior.  If you add another interface configuration to
> /etc/network/interfaces and ifup the new interface it will be available for
> use.  I'm not certain that cloud-init will create the interface for you.

In Ubuntu precise, AFAIK, it's not doing it.
I added the following in my /etc/rc.local

for iface in $(ifconfig -a | grep ^eth|awk '{print $1}')
do
    if ! grep -q "^iface $iface" /etc/network/interfaces
    then
        cat >> /etc/network/interfaces <<EOF
auto $iface
iface $iface inet dhcp
EOF
        ifup $iface
    fi
done

.a.


-- 
antonio.s.messina at gmail.com
antonio.messina at uzh.ch                     +41 (0)44 635 42 22
GC3: Grid Computing Competence Center      http://www.gc3.uzh.ch/
University of Zurich
Winterthurerstrasse 190
CH-8057 Zurich Switzerland




More information about the Openstack mailing list