Rocky 9 LXD image not releaseing physical nics properly

I opened an issue on github for LXD and they closed it as this appears to be an issue with the image.

I found that when adding a physical device to a rocky 9 container with a physical nic attached and stopping the device is released and renamed incorrectly. The only way I have found to resolve this state is to reboot the host.

A long term,but disagreeable, fix is to disable net.ifnames and biosdevname in the kernel cmdline and set names to their ethX names.

github link: LXD fails to rename network device when container is stopped · Issue #10851 · lxc/lxd · GitHub

I’m sure this is a RHEL 9 issue so it’s upstream from rocky but I wanted to share what I have found.

I have a libvirt VM that I can export and share specifically built to test this.