Ask Your Question
1

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

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

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
2

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

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

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
0

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

vikrant gravatar image

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

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

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-10-10 21:06:03 -0600

Seen: 718 times

Last updated: Oct 12 '15