Ask Your Question

can I assign my own ip after the instance boots up.

asked 2014-11-10 17:27:44 -0500

nakul gravatar image

Basically I want to achieve the following:

1) I have a 2 vm instances
2) These both vms are identical except one is active and other is standby.
3) I need both of this to have the same Ip except that the standby vm is not using this IP.
4) When a switch over happens I want the standby to take over the Ip the active was using and now the old active vm becomes standby now.

Thanks, Nakul

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted

answered 2014-11-10 22:32:31 -0500

pramdoyal gravatar image

HI Nakul,

I do understand that you want a to achieve a HA service and this can be done with keepalived. (

Thanks Prakash

edit flag offensive delete link more

answered 2014-11-11 00:07:12 -0500

SamYaple gravatar image

updated 2014-11-11 00:08:39 -0500

Hello, yes! This is perfectly doable with neutron. I am not sure about nova-network (highly unlikely from what I understand about it).

You'll want to look at neutron port-create and neutron port-update commands.

So the procedure looks like the following (please note, the commands are from my memory and may not work in a copy/paste fashion):


  • Two existing instances with ip_addresses of and respectively
  • One VIP address of not currently in use by any instance or device

Steps to run keepalived:

  • nova list and find the ip address associated with that instance
  • neutron port-list | grep $ip_address and find the port_uuid assciated with that ip_address
  • neutron port-update $port_uuid --allowed-address-pairs type=dict list=true ip_address=''
  • Repeat the above steps for each instance you wish to be able to talk with the VIP address

At this point you have setup the rules to allow the VIP address to talk out of each instance. However, this VIP address is not assigned with DHCP, it is entirely up to you to manage assigning and unassigning it; Only the iptables rules were created.

You can then use keepalived or some other method to implement your active/passive configuration.

edit flag offensive delete link more

answered 2014-11-10 23:06:15 -0500

Using HAProxy and Keepalived packages (services) we can achieve this.

Neutron Load Balance as a Service internally uses HAProxy.

So you can configure Neutron LBaaS to achieve your goals.

edit flag offensive delete link more


Thanks for your answer but can you please elaborate or point me to somewhere which details how to do this?

nakul gravatar imagenakul ( 2014-11-10 23:22:04 -0500 )edit

Sure... Below is the link go through that you will get some idea. If not bug me again.


TechPatron gravatar imageTechPatron ( 2014-11-11 00:47:53 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-11-10 17:27:44 -0500

Seen: 168 times

Last updated: Nov 11 '14