When I try to create a macvlan network I get an error response that a random network is using the parent interface.
- deleting all networks and images.
- a docker network prune
- and a docker system prune
But still no luck. Does anyone have any suggestions please?
Command and response below
docker network create -d macvlan -o parent=eno1 --subnet 10.10.10.0/24 --gateway 10.10.10.1 mynet
Error response from daemon: network dm-ce3efa4b0a15 is already using parent interface eno1
It means you previously created tha network with the id “ce3efa4b0a15”. Now Docker thinks that network still exists. Here is what I would try in addition to what you have already tried:
- Restart the docker daemon
- Check if you have an other installation. For example a rootless docker. I am not sure you could create macvlan with that, but it is worth a try to check it.
- Since you wrote you have already deleted all networks, it shouldn’t be a problem, but maybe Docker still has the information about that network due to some inconsistent file writing.
- First, you should restart your machine unless you have already done it too.
- Create a backup of your docker data folder (
/var/lib/docker by default) and remove
local-kv.db from that folder (
/var/lib/docker/network/files/local-kv.db by default) and restart the Docker daemon again. This file is where the information about docker networks are stored. If you want to read it, I created a tutorial not long ago. Search for
If none of the above solutions work, tell me here and I try to find something out (or anyone else ).
Thank you @rimelek
Thank you, sir!
You saved my ass