Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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=                                   |