Network interface is in use, but no vm/container exists

I try to remove two different interfaces which was being created automatically by incus - one of them by me during the initialization of incus (incus admin init) and the other was made by incus itself, I’m not sure why or how: incusbr1 (the one that I made) and incusbr-0 (an interface made by incus automatically).

No machines (nor containers) exist on the system, I removed all of them with incus rm <machine_name>.

$ incus network delete incusbr-0 
Error: The network is currently in use
$ incus network delete incusbr1
Error: The network is currently in use

Yet, Incus is showing:

$ incus network list
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+
|   NAME    |   TYPE   | MANAGED |       IPV4       | IPV6 |                DESCRIPTION                 | USED BY |  STATE  |
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+
| eth0      | physical | NO      |                  |      |                                            | 0       |         |
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+
| foo-incus | bridge   | YES     | 10.4.52.1/24     |      |                                            | 0       | CREATED |
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+
| incusbr1  | bridge   | YES     | 192.168.122.1/24 | none |                                            | 1       | CREATED |
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+
| incusbr-0 | bridge   | YES     | 10.91.66.1/24    |      | Network for user restricted project user-0 | 1       | CREATED |
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+
| lo        | loopback | NO      |                  |      |                                            | 0       |         |
+-----------+----------+---------+------------------+------+--------------------------------------------+---------+---------+

But:

$ incus list --all-projects
+---------+------+-------+------+------+------+-----------+
| PROJECT | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+---------+------+-------+------+------+------+-----------+

I tried:

  • rm -rf /var/lib/incus/networks/incusbr* - Didn’t worked, Incus keeps making those folders again and again.

Didn’t tried to remove incus dnsmasq configuration: /etc/dnsmasq.d-available/incus, A file that is clearly responsible for the new automated incusbr-0, which wasn’t created by me:

root# cat /etc/dnsmasq.d-available/incus
# Tell any system-wide dnsmasq instance to make sure to bind to interfaces
# instead of listening on 0.0.0.0
# WARNING: changes to this file will be lost if incus is removed.
bind-interfaces
except-interface=incusbr0

So what to do from here? Should I re-install incus? should I surrender to those interfaces that won’t let go?

Use incus network show incusbr-0. This will tell you what’s using it, under used_by.

Most likely it’s referenced from a profile, in which case you need to edit that profile (e.g. to make it refer to a different network), or if it’s unused, just delete the profile.

It prints the following:

$ incus network show incusbr-0 
config:
  ipv4.address: 10.91.66.1/24
  ipv4.firewall: "false"
  ipv4.nat: "true"
  ipv6.firewall: "false"
description: Network for user restricted project user-0
name: incusbr-0
type: bridge
used_by:
- /1.0/profiles/default?project=user-0
managed: true
status: Created
locations:
- none
project: default

I managed to remove the other one (incusbr1) by editing the profile (incus profile edit default), so now i’m only left with this one

Perhaps I don’t need to delete it?

Now run incus project list, and incus profile list --project=user-0.

I think you’ve probably set up incus to have per-user confined projects (using the incus group) as opposed to global access (the incus-admin group)

I don’t use this method myself, so I’m not entirely sure what to do, but I think you could just default the user-0 project (I know there is a --force flag which deletes everything inside that project, including its profiles).

I’ve reinstalled incus using Devuan’s apt-get and it seems that on Devuan it is being created automatically. What do I mean:

When you run rc-service incus stop ; rc-service incus start as root on Devuan (or incus admin shutdown ; then go root and rc-service incus start) it creates automatically a new project called user-0 and the description is:

User restricted project for “root” (0)

It wasn’t done by me as I purged the entire package and re-installed and configured through incus admin init. It is something that is happening in Devuan for some reason