Ask Your Question
0

change instance ip

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

brussels gravatar image

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

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

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=10.0.0.30 \
  --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=10.0.0.30                                   |
edit flag offensive delete link more

Comments

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

brussels gravatar imagebrussels ( 2014-05-02 08:10:39 -0500 )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 -0500 )edit

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: 2014-05-01 13:32:45 -0500

Seen: 1,115 times

Last updated: May 02 '14