Re: [bitfolk] Debian 10 upgrade and udev network name

Top Page
Author: Andy Smith
Date:  
To: users
Subject: Re: [bitfolk] Debian 10 upgrade and udev network name

Reply to this message
gpg: Signature made Mon Apr 13 09:36:14 2020 UTC
gpg: using DSA key 2099B64CBF15490B
gpg: Good signature from "Andy Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andrew James Smith <andy@strugglers.net>" [unknown]
gpg: aka "Andy Smith (UKUUG) <andy.smith@ukuug.org>" [unknown]
gpg: aka "Andy Smith (BitFolk Ltd.) <andy@bitfolk.com>" [unknown]
gpg: aka "Andy Smith (Linux User Groups UK) <andy@lug.org.uk>" [unknown]
gpg: aka "Andy Smith (Cernio Technology Cooperative) <andy.smith@cernio.com>" [unknown]
Hi Alastair,

On Mon, Apr 13, 2020 at 10:18:32AM +0100, Alastair Sherringham wrote:
> I am wanting to upgrade my server from Debian 9 to Debian 10. I
> have done this on other systems without problems but have a
> question about the Bitfolk VM and network interface name.


Since the MAC addresses and interface names are fixed in the config
on BitFolk's side, interface names are stable inside the VMs and
eth0 will always be eth0.

I've installed Debian 10 in BitFolk VMs many times and upgraded to
it many times and it's never changed away from eth0.

Here's something I wrote to another customer who asked:

    Based on a Xen guest's device directory in sysfs being something
    like:


        /sys/devices/vif-0/net/eth0/


    …then on second look it seems that here:


        https://github.com/systemd/systemd/blob/master/src/udev/udev-builtin-net_id.c#L780


    …it just doesn't fall into any of the existing categories except
    for MAC-based, which as you say is disabled by default.
    Specifically, it is not considered PCI because it's on a bus
    called "vif-0" or whatever, not "pci".


    I suppose it is possible that in future Xen could change
    something here, or udev could add an extra test.


    If you are worried about this then I think you could do one of
    several things, such as:


    - Use the net.ifnames=0 kernel command line option to
      disable any future renaming.


    - Enable the MAC-based device naming; your MAC address will not
      change for the life of the account.


    - Add a udev rule to rename based on MAC address to something
      you choose.


So I don't think you need to do anything at all.

On bare metal or a KVM guest it would probably be a different story.

Cheers,
Andy

--
https://bitfolk.com/ -- No-nonsense VPS hosting