Thank you for the contribution, I would like to include it in base rpm!
I took a look to the patch but I think there are still one issue.
systemd-detect-virtexits with 0 even if the machine is a non-LXC virtual machine.
For example, inside my VirtualBox, systemd-detect-virt says the machine is virtual, but the interface names are not “veth”.
I think you should handle different scenarios. Something like:
- the machine is physical, use the old code
- the machine is a VM with emulated interface, use the old code
- the machine is a container, try to find all veth (or any other name) virtual interfaces