Using an OpenWrt VirtualBox images and adding network adapters is producing non-predictable interface names, I don't know if this is a bug or a misconfiguration on my side but here's how to reproduce it
1 - set up a VM in VirtualBox using the hard disk image provided by OpenWrt
2 - add only one network adapter (intel pro/1000) it doesn't matter if it was a nat or a host-only network anything will do the trick.
3 - after powering on the VM machine you get one interface 'eth0' and if you get it's PCIe path
#Adapter 1: connected to 'eth0' root@OpenWrt:/# realpath /sys/class/net/eth0/device /sys/devices/pci0000:00/0000:00:11.0
this is pretty normal but the problem starts when adding new adapters so turn off the VM and add a second adapter, same settings (intel pro 1000).
4 - You'd expect the first adapter to retain it's interface name 'eth0' and our second adapter should show up as 'eth1' right? well it's not the case what's happening is that the first adapter is being named "eth1" and the second adapter is being named "eth0" and this is probably because the PCIe path for the second adapter has a lower number port than the first adapter.
#adapter1: connected to 'eth1' root@OpenWrt:/# realpath /sys/class/net/eth1/device /sys/devices/pci0000:00/0000:00:11.0
#adapter 2: connected to eth0 root@OpenWrt:/# realpath /sys/class/net/eth0/device /sys/devices/pci0000:00/0000:00:08.0
this is very problematic for static network config like in OpenWrt OS especially while testing, I tested this using another Linux based distros and they didn't have the same behavior(probably because they use what's called Predictable Network Interface Names)
Should this be reported as a bug for VirtualBox maintainers or can this be solved from openwrt side ?