[nova] [neutron] multiple fixed_ip

Arnaud Morin arnaud.morin at gmail.com
Wed Mar 4 06:59:46 UTC 2020


Hello Slawek and all,

You are right, I forgot to mention that I want to set a specific IP, so
yes I am using the parameters you describe (v4-fixed-ip).

However when trying to use both the v4-fixed-ip and v6-fixed-ip, it does
not work. It seems that those params are mutually exclusives [1] on
client side.

Does anyone know if the server would accept more than one fixed-ips?
My attemps were not sucessful regarding this matter.

Another question is the accessIPv4 (and v6) params, does anyone know
what they are used for? Because they seems completely ignored by neutron
when used on nova client side [2].

[1] https://github.com/openstack/python-novaclient/blob/b9a7e03074cbaacc3f270b2b8228a5b85350a2de/novaclient/v2/servers.py#L798
[2] https://github.com/openstack/python-novaclient/blob/b9a7e03074cbaacc3f270b2b8228a5b85350a2de/novaclient/v2/servers.py#L815

-- 
Arnaud Morin

On 03.03.20 - 21:34, Slawek Kaplonski wrote:
> Hi,
> 
> If Your network has got IPv4 and IPv6 subnet, it should be done by default that created port will have one IPv4 and one IPv6 allocated. I just did it with nova client:
> 
> nova boot --flavor m1.micro --image cirros-0.4.0 --nic net-name=private test-vm
> 
> And my vm has IPs like:
> 
> +--------------------------------------+---------+--------+------------+-------------+---------------------------------------------------------+
> | ID                                   | Name    | Status | Task State | Power State | Networks                                                |
> +--------------------------------------+---------+--------+------------+-------------+---------------------------------------------------------+
> | 92385f1f-7899-40b7-94ec-bbceb6749722 | test-vm | ACTIVE | -          | Running     | private=fdc8:d3a9:de7b:0:f816:3eff:fe0d:16f5, 10.0.0.31 |
> +--------------------------------------+---------+--------+------------+-------------+————————————————————————————+
> 
> Also from novaclient help message it seems that You should be able to specify such IPv4 and IPv6 addresses:
> 
> nova help boot | grep nic
>                  [--nic <auto,none,net-id=net-uuid,net-name=network-name,port-id=port-uuid,v4-fixed-ip=ip-addr,v6-fixed-ip=ip-addr,tag=tag>]
> 
> But that I didn’t try actually.
> 
> > On 3 Mar 2020, at 14:23, Radosław Piliszek <radoslaw.piliszek at gmail.com> wrote:
> > 
> > Hi Arnaud,
> > 
> > Non-core here.
> > Last time I checked you had to decide on one and then update with
> > neutron (or first create the port with neutron and then give it to
> > nova :-) ).
> > Moreover, not sure if IPv6 goes through Nova directly or not (docs
> > suggest still nah).
> > 
> > -yoctozepto
> > 
> > wt., 3 mar 2020 o 14:09 Arnaud Morin <arnaud.morin at gmail.com> napisał(a):
> >> 
> >> 
> >> Hello all,
> >> 
> >> I was doing some tests to create a server using nova API.
> >> My objective is to create a server with one port but multiples IPs (one
> >> IPv4 and one IPv6).
> >> 
> >> If I understand well the neutron API, I can create a port using the
> >> fixed_ips array parameter [1]
> >> 
> >> Unfortunately, on nova side, it seems to only accept a string with only
> >> one ip (fixed_ip) [2]
> >> 
> >> Is it mandatory for me to create the port with neutron?
> >> Or is there any trick that I missed on nova API side?
> >> 
> >> Thanks!
> >> 
> >> 
> >> [1] https://docs.openstack.org/api-ref/network/v2/?expanded=create-port-detail#ports
> >> [2] https://docs.openstack.org/api-ref/compute/?expanded=create-server-detail#create-server
> >> 
> >> 
> >> 
> >> --
> >> Arnaud Morin
> >> 
> >> 
> > 
> 
>> Slawek Kaplonski
> Senior software engineer
> Red Hat
> 



More information about the openstack-discuss mailing list