5

I wonder why my network interface is still named eth0 in my kvm guests. udevadm just outputs

# udevadm test-builtin net_id /sys/class/net/eth0 2> /dev/null
ID_NET_NAME_MAC=enxc2184ae7ab3f

I would expect them to be called like enpXsY. The directory /etc/udev/rules.d is empty. The Linux brand is Gentoo, 3.15.5-hardened-r2. Virtualization is KVM with qemu 2.0, the net interface is virtio. On the host and on other machines the setup is the same w.r.t. udev but the interfaces are called by their new names as expected.

Why is this so? What would it need to enable the new identifiers?

My first thought was that the new identifiers refer to PCI devices, and that virtio devices are not PCI devices. However, lspci proved me wrong:

00:03.0 Ethernet controller: Red Hat, Inc Virtio network device
    Subsystem: Red Hat, Inc Device 0001
    Flags: bus master, fast devsel, latency 0, IRQ 11
    I/O ports at c040 [size=32]
    Memory at febd1000 (32-bit, non-prefetchable) [size=4K]
    Expansion ROM at feb80000 [disabled] [size=256K]
    Capabilities: [40] MSI-X: Enable+ Count=3 Masked-
    Kernel driver in use: virtio-pci

00:04.0 SCSI storage controller: Red Hat, Inc Virtio block device
    Subsystem: Red Hat, Inc Device 0002
    Flags: bus master, fast devsel, latency 0, IRQ 10                                    
    I/O ports at c000 [size=64]
    Memory at febd2000 (32-bit, non-prefetchable) [size=4K]
    Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
    Kernel driver in use: virtio-pci

So that's not the reason.

3
  • Is this even a question? Or is it an observation?
    – krowe
    Aug 16, 2014 at 10:19
  • 1
    no, this is a question. Aug 16, 2014 at 10:50
  • 1
    It is called eth0 because there is no udev rule for renaming it. eth0 is the kernel name - it is the kernel's first ethernet slot. Create a udev rule for renaming the if or copy one from the other installations.
    – mikeserv
    Aug 16, 2014 at 17:00

0

You must log in to answer this question.

Browse other questions tagged .