Page 1 of 1

No networking on newest AWS instance types when using GenericCloud images

Posted: 2019/03/19 23:56:37
by srcno
In order to avoid restrictions on the boot volume imposed by images from the AWS Marketplace, we have been importing CentOS into our AWS account using AWS’s import-image API on the GenericCloud images on cloud.centos.org. In October, we imported the 1809 image successfully and have been using it for some time.

Recently, we created a new AWS account and decided to import the image again using the same process as before. However, instances with recently imported images are not able to get networking on the newer instance types (e.g. t3, m5, etc.), even if we use the old 1809 image.
The follow events are logged to the console:

[OK ] Reached target Network (Pre).
Starting LSB: Bring up/down networking...
[FAILED] Failed to start LSB: Bring up/down networking.
See 'systemctl status network.service' for details.
......
[ 7.871050] cloud-init[2585]: ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
[ 7.876638] cloud-init[2585]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 7.881616] cloud-init[2585]: ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
[ 7.886524] cloud-init[2585]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
[ 7.891447] cloud-init[2585]: ci-info: | ens5: | False | . | . | . | 02:af:09:b1:18:9e |
[ 7.896308] cloud-init[2585]: ci-info: | lo: | True | 127.0.0.1 | 255.0.0.0 | . | . |
[ 7.901200] cloud-init[2585]: ci-info: | lo: | True | . | . | d | . |
[ 7.906346] cloud-init[2585]: ci-info: +--------+-------+-----------+-----------+-------+-------------------+
++++++

Since the same image has different behavior, I went to AWS support believing something changed on their end. The solution they provided was to add “net.ifnames=0 biosdevname=0” to the GRUB_CMDLINE_LINUX in /etc/default/grub and rebuild grub.

However, when I look at my previously working systems and the instances in Marketplace, those settings are not there. I want to keep my instances somewhat consistent and would like to solve this the same way CentOS does with their Marketplace image. Is there any better guidance for getting the ENA driver working?

Re: No networking on newest AWS instance types when using GenericCloud images

Posted: 2019/03/27 06:39:16
by emailkprasad
The “net.ifnames=0 biosdevname=0” grub parameter is used to give "ethX" names to the NIC regardless of make/model.
From your image log you've posted, I see the NIC is named as "ens5" and is not active.

Re: No networking on newest AWS instance types when using GenericCloud images

Posted: 2019/07/18 12:48:28
by brilong
How did you end up fixing this issue? I just ran into the same issue by importing the latest CentOS GenericCloud .raw image and the network interface is offline. How do you inject the new GRUB parameters into the GenericCloud image before importing it into AWS?

Re: No networking on newest AWS instance types when using GenericCloud images

Posted: 2019/07/23 16:10:08
by duckie
Hello all

I had the same issue and solved it using another way to import the raw images.

The reason for the failure is because import-image actually runs the imported image then makes an AMI out of it. I suspect some deprovisioning step is not properly ran and causes those strange issues with the network.

To fix this, I basically did what you can find on this SO post: https://stackoverflow.com/questions/240 ... ith-python

It is a bit easier than the post says, since you dont have to worry about the AKI or ARI, the default ones work like a charm. Just be careful to select the architecture and the virtualization type since the CLI defaults are not the right ones. Be careful with the "utility" command too. I suggest unpacking the raw image and run a cat command of it into the EBS as separated commands.

It is a lot of work to get properly scripted, but it does the job.