Hi Jorge,

You can use heat template to launch these type of VM's, The user data to
edit interface file can be:

user_data:
    #!/bin/bash
    sudo echo >> /etc/network/interfaces
    sudo echo auto ens3 >> /etc/network/interfaces
    sudo echo iface ens3 inet dhcp >> /etc/network/interfaces
    sudo echo iface ens3 inet6 auto >> /etc/network/interfaces
    sudo echo pre-up sleep 5 >> /etc/network/interfaces
    sudo echo dhcp 1 >> /etc/network/interfaces



Regards

On Tue, Jun 6, 2017 at 1:05 AM, Jorge Luiz Correa <corre...@gmail.com>
wrote:

> I need to customize/configure the file /etc/network/interfaces (or
> 50-cloud-init.cfg) from Ubuntu and Debian cloud images. My environment uses
> IPv6 with stateless configuration so I have replace this:
>
> --- generated by cloud-init ---
> auto lo
> iface lo inet loopback
>
> auto ens3
> iface ens3 inet dhcp
> ---
>
> with this:
>
> ---
> auto lo
> iface lo inet loopback
>
> auto ens3
> iface ens3 inet dhcp
> iface ens3 inet6 auto
>   pre-up sleep 5
>   dhcp 1
> ---
>
> This configuration makes the instance generate theis IPv6s and get others
> configurations from DHCPv6. The 'sleep' is due a Ubuntu bug.
>
> How can I do that?
>
> I need to customize the image before upload to OpenStack? Is there any way
> to pass this configuration at boot time? Is there any way to force all
> instances to have this configuration?
>
> I appreciate any help!
>
> Thanks.
>
> - JLC
>
> _______________________________________________
> 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
>
>
_______________________________________________
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

Reply via email to