How to remove/delete virbr0 ?

As you know “virbr0” is created by libvirtd service . It will create a bridge called “virbr0” when libvirt deamon start in your system. It will act as a gateway for the VMs to route traffic. libvirtd will also insert iptables rules in iptable configuration for proper routing/natting of VM packets. I have seen requests to delete this bridge in some setup.

If you dont want to use libvirtd service, you can stop the same which will pull all these network configuration from the system.

If you want to use libvirtd and dont want “virbr0”, here is the way

First list the network configuration via virsh command

Below command can be used to see a list of all virtual networks

[root@humbles-lap qemu]# virsh net-list –all
Name State Autostart
—————————————–
default active yes

[root@humbles-lap qemu]# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes

Below one can be used to to shutdown desired running network. Here “deafult” is the network name.

[root@humbles-lap qemu]# virsh net-destroy default
Network default destroyed

Now virbr0 and its iptables configuration has been removed..

[root@humbles-lap qemu]# brctl show
bridge name bridge id STP enabled interfaces

[root@humbles-lap qemu]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination

Chain FORWARD (policy ACCEPT)
target prot opt source destination

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@humbles-lap qemu]#

If you want to permanently remove the network use, ‘virsh net-undefine’ command..

Thats it ..