How to create an instance with a specific ip?

asked 2018-09-15 14:49:44 -0600

anonymous user


Hello I searched in ( . But I can not find the option for the instance to create it with a non-random ip. For example I want to create the instance in the network with the ip This is the command I use:

openstack server create --flavor m1.tiny --image cirros --nic net-id=LAB1 --security-group default cirros1

I'm sorry about the stupid question

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2018-09-15 18:24:38 -0600

codylab gravatar image

updated 2018-09-15 18:29:09 -0600

openstack server create --nic net-id=<net-uuid>,v4-fixed-ip= with other arguments.

edit flag offensive delete link more

answered 2018-09-18 08:12:23 -0600

Mohit gravatar image

You can create a port with specific ip address on neutron , using command neutron port-create --fixed-ip and boot the vm specifying port-id= so that the instance is binded to the neutron port

edit flag offensive delete link more


That also works for assigning a fixed IP to VM. The only caveat for this approach is to remember to delete the port after removing the instance, to avoid from leaving an orphaned port with a binded IP behind.

codylab gravatar imagecodylab ( 2018-09-18 09:44:10 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-09-15 14:49:44 -0600

Seen: 1,768 times

Last updated: Sep 18 '18