Ask Your Question

Revision history [back]

on openstack you could use neutron port-create, and using this command you could pass a static ip, for example:

neutron port-create --name your_static_port_name --fixed-ip ip_address=192.168.1.254 --security-group default Priv-Net

after that you can pass the port-id to "nova boot ... --nic port-id=190f4b1b-eecf-483d-b156-3a66f1a4a836 ... " or you can attach the new ethX interface to existing instance by "nova interface-attach"

HTH Amedeo

on openstack you could use neutron port-create, and using this command you could pass a static ip, for example:

neutron port-create --name your_static_port_name --fixed-ip ip_address=192.168.1.254 --security-group default Priv-Net

after that you can pass the port-id to "nova boot ... --nic port-id=190f4b1b-eecf-483d-b156-3a66f1a4a836 ... " or you can attach the new ethX interface to existing instance by "nova interface-attach"

otherwise you can use "neutron port-update" to assign to an existing port a new preferred IP -> you have to reconfigure your instance by hand with new IP because neutron antispoofing doesn't allow to use different IP than it expect (unless you disable it by a command like: "neutron port-update your_port_name --allowed_address_pairs type=dict list=true mac_address=XX:XX:XX:XX:XX:XX,ip_address=0.0.0.0/0").

HTH Amedeo