Not-so-predictable network names

andrew bezella abezella at archive.org
Thu Aug 4 17:52:55 CEST 2016


On Thu, 2016-08-04 at 17:09 +0200, Alexander Thomas wrote:
[...]

> Although it feels dirty and unreliable and I don't know why I need to
> use SLOT here instead of PATH, it worked fine, at first. When I try to
> install a VM with a virtio network interface, it breaks. In that case,
> ID_NET_NAME_SLOT is no longer in the udevadm output, only
> ID_NET_NAME_MAC is. Still, the interface eventually becomes ‘ens3’,
> but that name is nowhere to be found in the udevadm output.

for vm installs i pick/set a class to identify that it will be a vm,
then explicitly set NIC1 to ‘ens3’ in that case.  inelegant but it
works.

why slot and not port: 
> Working from top to bottom, udev takes the first match of:
> 
> * ID_NET_NAME_FROM_DATABASE
> * ID_NET_NAME_ONBOARD
> * ID_NET_NAME_SLOT
> * ID_NET_NAME_PATH
> * ID_NET_NAME_MAC

cf. https://major.io/2015/08/21/understanding-systemds-predictable-network-device-names/

hth...

	andy

-- 
andrew bezella <abezella at archive.org>
Internet Archive


More information about the linux-fai mailing list