Bug 1374241 - interface name changed after reboot
Summary: interface name changed after reboot
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: systemd
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: systemd-maint
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-09-08 10:08 UTC by Jun Hu
Modified: 2016-09-09 14:56 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-09 14:56:14 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Jun Hu 2016-09-08 10:08:11 UTC
Description of problem:
interface name changed in a kvm vm after reboot

Version-Release number of selected component (if applicable):
host:

[root@host0 log]# rpm -qa | grep udev 
python-gudev-147.2-7.el7.x86_64
libgudev1-219-19.el7.x86_64
python-pyudev-0.15-6.el7.noarch
[root@host0 log]# rpm -qa | grep libvirt 
libvirt-daemon-driver-interface-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-driver-nwfilter-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-driver-lxc-1.2.8-16.el7_1.4.x86_64
libvirt-client-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-driver-storage-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-driver-network-1.2.8-16.el7_1.4.x86_64
libvirt-gobject-0.1.7-3.el7.x86_64
libvirt-glib-0.1.7-3.el7.x86_64
libvirt-daemon-config-network-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-kvm-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-driver-secret-1.2.8-16.el7_1.4.x86_64
libvirt-1.2.8-16.el7_1.4.x86_64
fence-virtd-libvirt-0.3.2-1.el7.x86_64
libvirt-daemon-driver-qemu-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-config-nwfilter-1.2.8-16.el7_1.4.x86_64
libvirt-daemon-1.2.8-16.el7_1.4.x86_64
libvirt-gconfig-0.1.7-3.el7.x86_64
libvirt-python-1.2.8-7.el7_1.1.x86_64
libvirt-daemon-driver-nodedev-1.2.8-16.el7_1.4.x86_64

vm:
[root@rhv-h network-scripts]# rpm -q udev
package udev is not installed
[root@rhv-h network-scripts]# rpm -qa | grep udev 
libgudev1-219-19.el7_2.12.x86_64
python-pyudev-0.15-7.el7_2.1.noarch
python-gudev-147.2-7.el7.x86_64



How reproducible:


Steps to Reproduce:
1.install a kvm rhel7 vm in rhel7 host, the vm has a virtio interface
2.add another interface with rt8139 driver, you will see eth0, ens9 interface name.
3.reboot, you will see eth0 name change to eth1, ens9 remains unchanged.

Actual results:
interface name changed after reboot

Expected results:
interface name remain unchanged.

Additional info:

Comment 2 Lukáš Nykrýn 2016-09-09 14:56:14 UTC
Well kernel names (ethN) are not persistent, there is nothing we can do about it. But I think that since 219-19 we also support persistent names for virtio device. Try to boot with net.ifnames=1 on the kernel command line.
All you can just pick some name a assign it to the device with specific hwaddress through ifcfg files. You just need to set DEVICE and HWADDR variables (but don't pick ethXX name).


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