Ask Your Question

Is there a way to attach a fixed PRIVATE ip to an instance?

asked 2015-10-10 21:06:03 -0500

vblando gravatar image

I have an instance that we launch but it needs to have the old private IP back, is there a way to do this?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2015-10-11 21:26:12 -0500

updated 2015-10-11 21:26:38 -0500

Set up a port with a fixed address, then launch your instance on this port:

neutron port-create .... --fixed-ip subnet_id=SUBNET,ip_address=IP_ADDR .....
nova boot .... nic port_id=....

or simply provide the IP address in the nova boot command

nova boot .... --nic <net-id=net-uuid,v4-fixed-ip=ip-addr ....

See also: neutron CLI reference and nova CLI reference

edit flag offensive delete link more

answered 2015-10-12 00:37:56 -0500

vikrant gravatar image

updated 2015-10-12 00:38:46 -0500

Create a neutron port with fixed IP on a specific network,subnet -

neutron port-create --fixed-ip subnet_id=<subnet_id>,ip_address=<fixed_ip> --name flat-port-subnet1 <net_id>

launch the VM with nova command and using '--port-id' to get the above mentioned fixed IP address

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-10-10 21:06:03 -0500

Seen: 975 times

Last updated: Oct 12 '15