Ask Your Question
2

How to assign static private IP address to a running guest VM?

asked 2015-04-15 15:38:50 -0500

chrone gravatar image

Hi Guys,

How to assign static private IP address to a running guest VM? I could not find any menu to edit the private IP address dynamic range for VM in the OpenStack Dashboard.

Or where and how to edit the private ip address dynamic range so I can assign the static private IP address manually and not conflict with the private DHCP range for guest VMs?

Thanks in advanced. :)

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
5

answered 2015-04-15 16:48:49 -0500

Have you tried this ?

]# nova help add-fixed-ip
usage: nova add-fixed-ip <server> <network-id>

Add new IP address on a network to server.

Positional arguments:
  <server>      Name or ID of server.
  <network-id>  Network ID.


# nova help remove-fixed-ip
usage: nova remove-fixed-ip <server> <address>

Remove an IP address from a server.

Positional arguments:
  <server>   Name or ID of server.
  <address>  IP Address.
edit flag offensive delete link more

Comments

Thanks for the comment, nope I haven't. I'll try it later. :) Will it conflict with the private DHCP server in neutron/openvz if we set a static private to the guest VM or the DHCP server is smart enough to know that we have set aside the static ip private from the list of DHCP pool?

chrone gravatar imagechrone ( 2015-04-15 17:45:39 -0500 )edit
1

answered 2016-01-06 15:21:13 -0500

You can also update the port directly in neutron:

neutron port-update PORT_UUID --request-format=json --fixed_ips type=dict list=true subnet_id=SUBNET_UUID,ip_address=IPADDR
edit flag offensive delete link more
0

answered 2015-04-15 22:41:14 -0500

dodi gravatar image

You can also try creating a network without DHCP enabled that way you can just assign your static IP based on the CIDR that you have configured for the network you have created.

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

2 followers

Stats

Asked: 2015-04-15 15:38:50 -0500

Seen: 14,808 times

Last updated: Jan 06 '16