Ask Your Question
0

Static ip for instance using yaml file

asked 2019-09-20 09:33:41 -0500

snowmoon gravatar image

Hi , I am trying to create an instance which uses a predefined static IP using yaml file. But when I tried to create its success but there is two IPs are showing in dash board . One allocated static ip and another 1 is dhcp IP. Network I created by disabling DHCP but not sure still how its created . attaching the snapshot (yellow marked are automatically assigned) and yaml file .image description .

> resources:    instance:
>      type: OS::Nova::Server
>      properties:
>        name: test
>        flavor: oti_c8_c32_d300
>        key_name: crowd-key
>        availability_zone: zone-1
>        image: baseos-18.12.0.rhel.x86_64.qcow2
>        networks:
>          - port: { get_resource: instance_port2 }
>          - port: { get_resource: instance_port3 }    instance_port2:
>      type: OS::Neutron::Port
>      properties:
>        network_id: sarath_to_delete
>        security_groups:
>          - default
>        fixed_ips:
>         - ip_address: 1.1.1.2
>         - subnet: sarath_to_delete    instance_port3:
>      type: OS::Neutron::Port
>      properties:
>        network_id: sarath_to_delete_1
>        security_groups:
>          - default
>        fixed_ips:
>         - ip_address: 2.2.2.2
>         - subnet: sarath_to_delete_1
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-09-21 12:02:36 -0500

Mohit gravatar image

Update the fixed_ip section -:

fixed_ips:
 - ip_address: 2.2.2.2
 - subnet: sarath_to_delete_1

with

fixed_ips:[{"ip_address": 2.2.2.2, "subnet_id": 5bd749c2-d239-4d79-bd2b-102158a1dad2}]
edit flag offensive delete link more

Comments

iam facing an issue , i wanted to attach multiple static ip but only 1 IP is getting attached .

here is the link for the issue .

https://ask.openstack.org/en/question/124358/how-to-attach-multiple-static-ip-through-heat-template/ (https://ask.openstack.org/en/question...)

srini gravatar imagesrini ( 2019-09-23 01:22:21 -0500 )edit

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

1 follower

Stats

Asked: 2019-09-20 09:33:41 -0500

Seen: 32 times

Last updated: Sep 21