Add interface to currently running instance

asked 2013-10-10 15:42:08 -0600

Snowball gravatar image

updated 2013-10-10 15:44:45 -0600

I have 2 networks, net1 and net2. I have an instance named test-fedora that is on the net1 network. Is there a way to add the pre-existing test-fedora instance to the net2 network?

I didn't see anything in the dashboard interface, so I tried

PORT_ID=$(quantum port-create net2 | grep ' id ' | awk '{print $4}')
nova interface-attach --port-id $PORT_ID test-fedora

After doing this, the "Network Topology" page on the dashboard showed test-fedora as being connected to both networks, but when I log into test-fedora and issue ip link, I only see the the interface on net1. I tried rebooting the instance, but the interface still doesn't show up.

edit retag flag offensive close merge delete


Did you configure the network for the second interface by adding one file /etc/sysconfig/network-scripts/ifcfg-eth1? I add this file for eth1, then reboot the VM. The interface can show up.

Euler gravatar imageEuler ( 2013-12-01 00:59:21 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-10-11 13:50:35 -0600

sebaridolfi gravatar image

updated 2013-10-11 13:51:47 -0600

what I did to be able to add more than one IP to an instance is this: First, you need to edit this file on every compute node:


To be like this:

<filter chain="root" name="nova-base"> <uuid>36cfc520-284c-ecbe-2804-fb8c999d3dea</uuid> </filter>

Then, restart ebtables and libvirt-bin

/etc/init.d/libvirt-bin restart /etc/init.d/ebtables restart

What this does is to disable ebtables of openstack, and allows you to add more than one IP to an instance using a virtual interface (such as eth0:1)

Remember to kill all dhclient services in order to nova does not bring down your new interfaces.

Maybe this will work for you as it is working for me.

I use OpenStack folsom version and nova-networks

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-10-10 15:42:08 -0600

Seen: 6,408 times

Last updated: Oct 11 '13