<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 9 December 2014 at 12:38, Martin Lipka <span dir="ltr"><<a href="mailto:Martin.Lipka@pulsant.com" target="_blank">Martin.Lipka@pulsant.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hi,</div>
<div><br>
</div>
<div>I would like to assign a static IP/subnet and the gateway of my choice to an instance (both windows and linux) while lunching it instead of using built-in DHCP.</div>
<div>What are my options in OpenStack to achieve it?</div>
<div><br>
</div>
<div>Regards,</div>
<div>Marti</div></div></blockquote><div><br></div><div>If using Heat, you can allocate the port.</div><div><br></div><div><div> pts_ctrl_port:</div><div> type: OS::Neutron::Port</div><div> properties:</div><div> name: {"Fn::Join": ["-", [{ get_param: "OS::stack_name" } , "pts-port"]]}</div><div> network_id: { get_resource: ctrl_net }</div><div> fixed_ips:</div><div> - ip_address: 172.16.1.13</div><div><br></div></div><div><div> pts:</div><div> type: OS::Nova::Server</div><div> properties:</div><div> name: { str_replace: { params: { $stack_name: { get_param: 'OS::stack_name' } }, template: '$stack_name-pts' } }</div><div> key_name: { get_param: 'ssh_key' }</div><div> image: { get_param: 'pts_image' }</div><div> flavor: "sv.pts"</div></div><div><div> networks:</div><div> - port: { get_resource: pts_ctrl_port }</div></div><div><br></div><div>in this case the dnsmasq will assign the ip you reuquested if you do DHCP, or you can assign manually in the image w/o conflict.</div><div><br></div></div></div></div>