Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Static ip for instance using yaml file

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