Running KVM and docker on the same host with a bridge

I have been running kvm with a bridge on my fedora machine for a while, when trying to run docker on the same host access to the kvm hosts would die as soon as docker came up. I read up online and most places mention that the two technologies should be able to co-exist with each other without any problems, after some further searching I was able to find an article that mentioned that if you have already setup a bridge for KVM you can tell docker to use this bridge. I was able to test this on my setup and it worked allowing docker to run without interfering with the existing bridge. Looking at the interfaces I can still see docker created an interface

docker0
but it doesn’t seem to be active.

The docker configuration involved adding this file

/etc/docker/daemon.json
with the following entry.
{ "bridge": "br0" }

Make sure the bridge number matches your existing bridge number in use by kvm.

Leave a Reply

Your email address will not be published. Required fields are marked *