RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1660179 - rhel-guest-image using Predictable Device Names rather than eth
Summary: rhel-guest-image using Predictable Device Names rather than eth
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rhel-guest-image
Version: 8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Mohammed Gamal
QA Contact: Wei Shi
Depends On: 1643347
TreeView+ depends on / blocked
Reported: 2018-12-17 17:37 UTC by Robert Locke
Modified: 2019-07-09 10:46 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-07-09 10:46:17 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Robert Locke 2018-12-17 17:37:56 UTC
Description of problem:
The updating of Grub2 according to /root/anaconda-ks.cfg to use net.ifnames did not take effect for the initial kernel.

Version-Release number of selected component (if applicable):
8.0 Beta and 8.0 Beta Snapshot 2

How reproducible:
Every time

Steps to Reproduce:
1. Boot the VM on top of RHEL 8 host
2. Inside the VM, the 2 VirtIO NICs will have names of ens3 and ens4

Actual results:
The NICs are using the newer "Predictable Network Interface Device Names" which is helpful in physical environments, but less so in virtual environments.

Expected results:
Continue the eth0 style naming as used in RHEL 7.x

Additional info:
This is related to the shift in RHEL 8 to use BLS (Boot Loader Spec).

The following three lines are affected in anaconda-ks.cfg:
# reorder console entries
sed -i 's/console=tty0/console=tty0 console=ttyS0,115200n8/' /boot/grub2/grub.cfg

# add additional flags for the running image
sed -i -e 's/115200n8/115200n8 no_timer_check net.ifnames=0/' /boot/grub2/grub.cfg

# make grub changes persistent
sed -i -e 's/^\{GRUB_CMDLINE_LINUX=.*\}"/\1 no_timer_check net.ifnames=0 console=ttyS0m115200n8"/' /etc/default/grub

It is the first two sed's that are having no effect because they need to edit the /boot/grub2/grubenv file and the kernelopts line to update the "existing" BLS entries. In fact, I *think* a line like:
# adjust existing BLS entries
sed -i -e 's/^\{kernelopts=.*\}/\1 no_timer_check net.ifnames=0 console=ttyS0m115200n8/' /boot/grub2/grubenv

I'll do some testing to see if that last line helps/works for me.

Comment 1 Robert Locke 2018-12-17 21:51:06 UTC
FYI, I would also be happy if we adopted shifting to using prefixdevname with RHEL8.

Change the above lines to be:
# adjust existing BLS entries
sed -i -e 's/^\(kernelopts=.*\)/\1 no_timer_check net.ifnames.prefix=net/' /boot/grub2/grubenv

# make grub changes persistent
sed -i -e 's/^\(GRUB_CMDLINE_LINUX=.*\)"/\1 no_timer_check net.ifnames.prefix=net"/' /etc/default/grub

Comment 2 Robert Locke 2019-03-13 14:22:55 UTC
This is different in the Snapshot 6 qcow2 made available where the net.ifnames=0 has been fully implemented for both initial boot and subsequent kernel updates.

The shift to net.ifnames.prefix=net had further complications, so I am glad we are not going that direction at this point.

Presuming the net.ifnames=0 persists to GA, I think this bug can be closed based on the work accomplished in https://bugzilla.redhat.com/show_bug.cgi?id=1643347

Comment 3 Mohammed Gamal 2019-07-09 10:46:17 UTC
Closing this as the requested change is already implemented. We should consider removing net.ifnames=0 altogether in the future. See BZ#1660122

Note You need to log in before you can comment on or make changes to this bug.