AWS EC2 instance type change and network connectivity issue

We switched from a t2.xlarge  instance type to m4.2xlarge, we lost the network connectivity for our Ubuntu instance.

I change back to t2 instance type the instance become reachable again.

when I check /var/log/cloud-init.log, AWS m4 instance ethernet interface name changed to ens3.

Performing a dhcp discovery on ens3

but 50-cloud-init.cfg was not updated. It has old eth0 ethernet name

# cat /etc/network/interfaces.d/50-cloud-init.cfg
# This file is generated from information provided by
# the datasource. Changes to it will not persist across an instance.
# To disable cloud-init’s network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

to solve the issue,

I added the following lines into /etc/network/interfaces and stop the instance & change the instance type

auto ens3
iface ens3 inet dhcp

 

ismail yenigul

AWS Certified Solution Architect

 

 

 

 

Advertisements
AWS EC2 instance type change and network connectivity issue

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s