Ask Your Question
0

How to add an IP to a instance online?

asked 2015-09-28 04:08:29 -0600

nethawk gravatar image

updated 2015-09-28 07:41:52 -0600

After I launched a instance with network A, I want to add an IP of another network B to this instance. I have tried using these two commands to do above operation:

neutron port-create ------ to create a new port
nova interface-attach ------- to attach the new port to my instance

But after executing the two commands,I can not ping the new IP from other instances in network B. So,how can I do? And it must be completed online without stopping the instance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-09-28 04:48:00 -0600

capsali gravatar image

Did you up the interface in the guest? The guest OS will see the new interface but is unconfigured! And be carefull about having 2 default gateways on same system.

edit flag offensive delete link more

Comments

I can only see the interface eth0 of network A on my instance. If I try to up the new interface eht1 on it, it returned an error: No such devdice. I used ifconfig to chenck interface and ifconfig eth1 up to up the new interface.

nethawk gravatar imagenethawk ( 2015-09-28 19:51:42 -0600 )edit

what does ip link output?

capsali gravatar imagecapsali ( 2015-09-29 04:34:54 -0600 )edit

ip link can only return lo and eth0. The IP of eth0 is the network A address. And the IP of lo is 127.0.0.1

nethawk gravatar imagenethawk ( 2015-09-29 21:52:02 -0600 )edit

Then nova didn't attach the port to the instance. If you have dashboard installed look under instances tab to your instance and see if you have two ports displayed. Did you use nova interface-attach or nova add-fixed-ip ?

Try to attach a port again to the instance!

capsali gravatar imagecapsali ( 2015-09-30 04:59:05 -0600 )edit

Yes,I used nova interface-attach. Under the instances tab in dashboard,I can see the two IPs of this my instance.

nethawk gravatar imagenethawk ( 2015-10-07 20:58:38 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-09-28 04:08:29 -0600

Seen: 69 times

Last updated: Sep 28 '15