Issue rebooting container with physical nic device passthrough

What is your host OS? I have a feeling this is an issue with the host OS not allowing incus to stop the network devices. It could also be host OS and hardware related as well, or it would be easier to reproduce.

Just a recap on what I had figured out, it seems it’s an old bug, which has been reported back still in 2022 with lxd on this post. The best explanation for the issue was due to @brauner in which he said:

When the container is stopped LXC will move the network device back to the host. In order to that it will use a “transient” name which it has used during interface creation. It’s basically a low-effort way to avoid name collisions on the host when moving a network device back that usually has a high-collision probability name such as “eth0” in the container.

In the final step it is renamed from the transient name to its original name on the host. Since the rename step fails after the device has been moved back it makes it somewhat likely that it’s a naming collision, i.e. it’s original hostname has been taken by another device.

So lxc renames the interface into those interface names we see and then tries to rename into the original name. The error occurs when lxc tries to rename the interface back into it’s original name, which fails for some unknown reason.

This is why I believe it’s an issue between lxc (which is used by incus) and the host OS and maybe something related to the particular hardware interface.