Mailing List Archive

How to make Neutron select a specific subnet when boot an instance
Hi there,

I have one question about choosing a specific subnet when boot a vm. My
OpenStack cluster is in Queens and I have multiple subnets in one network.
What I want is when I issue a boot command the instance only gets ip from
one subnet by default. I know there is a way to achieve that by creating a
port with --fixed-ip subnet=xxx then pass the port id to boot command.
Wondering if there is another way that does not need manually create the
port? Is there any configuration I can do to make it default for Neutron to
only pick one subnet from a network in boot?

Thanks for any help.

Best regards,
Hang
Re: How to make Neutron select a specific subnet when boot an instance [ In reply to ]
Hi,

depending on your workflow there would be a way with scripting [0],
not sure if this would be a suitable approach for you.
There also has been a blueprint [1] for the selection of subnets
during instance creation since Juno, but I can't find anything about
an implementation.

Regards,
Eugen

[0]
https://ask.openstack.org/en/question/95573/how-to-select-a-subnet-when-booting-an-instance/
[1]
https://specs.openstack.org/openstack/nova-specs/specs/juno/approved/selecting-subnet-when-creating-vm.html


Zitat von Hang Yang <skinnyh92@gmail.com>:

> Hi there,
>
> I have one question about choosing a specific subnet when boot a vm. My
> OpenStack cluster is in Queens and I have multiple subnets in one network.
> What I want is when I issue a boot command the instance only gets ip from
> one subnet by default. I know there is a way to achieve that by creating a
> port with --fixed-ip subnet=xxx then pass the port id to boot command.
> Wondering if there is another way that does not need manually create the
> port? Is there any configuration I can do to make it default for Neutron to
> only pick one subnet from a network in boot?
>
> Thanks for any help.
>
> Best regards,
> Hang




_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Re: How to make Neutron select a specific subnet when boot an instance [ In reply to ]
There has been some work on this [2], but it didn't make it into the
Kilo release (abandoned), and I don't see it either in later releases.

[2]
https://blueprints.launchpad.net/nova/+spec/selecting-subnet-when-creating-vm


Zitat von Hang Yang <skinnyh92@gmail.com>:

> Hi there,
>
> I have one question about choosing a specific subnet when boot a vm. My
> OpenStack cluster is in Queens and I have multiple subnets in one network.
> What I want is when I issue a boot command the instance only gets ip from
> one subnet by default. I know there is a way to achieve that by creating a
> port with --fixed-ip subnet=xxx then pass the port id to boot command.
> Wondering if there is another way that does not need manually create the
> port? Is there any configuration I can do to make it default for Neutron to
> only pick one subnet from a network in boot?
>
> Thanks for any help.
>
> Best regards,
> Hang




_______________________________________________
Mailing list: http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack
Post to : openstack@lists.openstack.org
Unsubscribe : http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack