Ask Your Question

change instance ip

asked 2014-05-01 13:32:45 -0600

brussels gravatar image

Hi, Is it possible to control what IP address is assigned to instance and how to change assigned address (e.g to some other from the same subnet?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-02 07:50:31 -0600

larsks gravatar image

You can specify a fixed ip address explicitly when booting your instance with nova boot using the v4-fixed-ip suboption to --nic:

  --nic <net-id=net-uuid,v4-fixed-ip=ip-addr,port-id=port-uuid>
                        Create a NIC on the server. Specify option multiple
                        times to create multiple NICs. net-id: attach NIC to
                        network with this UUID (required if no port-id), v4
                        -fixed-ip: IPv4 fixed address for NIC (optional),
                        port-id: attach NIC to port with this UUID (required
                        if no net-id)

So for example, I could boot an instance like this with an explicit ip address:

$ nova boot --nic net-id=3ff9b903-e921-4752-a26f-cba8f1433992,v4-fixed-ip= \
  --image centos-6-cloud --key-name lars --flavor m1.small test0

Once this finishes booting:

$ nova list | grep test0
| 78ccced2-e8fe-4180-8beb-028a26b63b3c | test0       | ACTIVE  | -          | Running     | net0=                                   |
edit flag offensive delete link more


This valid for CLI. How can I configure it in GUI for permanent binding?

brussels gravatar imagebrussels ( 2014-05-02 08:10:39 -0600 )edit

Someone else will have to address that question; I'm not familiar with the GUI.

larsks gravatar imagelarsks ( 2014-05-03 21:03:27 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-05-01 13:32:45 -0600

Seen: 1,207 times

Last updated: May 02 '14