How to disable virbr0 Interface in Freshly Installed OS CentOS/ RedHat Linux

I  installed freshly Operating system of CentOS 7/Red Hat and see virbr0 network interface along with my eth0 interface? How do I disable or remove virbr0?

Virbr0 – Is KVM/Xen interface used by Virtualization guest and host OS’es for network communication of the VMs and below is the Steps on how to remove this virbr0 if you will not used it.

Step 1:  Login in your SSH console using your favorite client putty.exe and type ‘ifconfig’. In below example you notice that there is virbr0 along with the eth0 or your custom nic card name.

[[email protected] ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.4.97.11  netmask 255.255.240.0  broadcast 10.4.111.255
        inet6 fe80::250:56ff:feac:77be  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:ac:77:be  txqueuelen 1000  (Ethernet)
        RX packets 3053  bytes 798917 (780.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 780  bytes 91716 (89.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0xfd4a0000-fd4c0000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 192.168.122.1  netmask 255.255.255.0  broadcast 192.168.122.255
        ether 52:54:00:5c:74:81  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

virbr0_01

Step 2: type below commands in your terminal to remove the virbr0 interface

yum groupremove “Virtualization”
or
virsh net-list
virsh net-destroy default
virsh net-undefine default
service libvirtd restart

[[email protected]~]# yum groupremove "Virtualization"

if this does not work you can try this next command to remove

[[email protected] ~]# virsh net-list
 Name                 State      Autostart     Persistent
 ----------------------------------------------------------
 default              active     yes           yes
 [[email protected]~]#
[[email protected]~]# virsh net-destroy default
 Network default destroyed
 [[email protected]~]#
[[email protected]~]# virsh net-undefine default
 Network default has been undefined
 [[email protected]~]#
[[email protected] ~]# service libvirtd restart
 Redirecting to /bin/systemctl restart  libvirtd.service
 [[email protected] ~]#

virbr0_02

Step 3: Run the command ‘ifconfig’ again to verify if the virbr0 is gone.

[[email protected]~]# ifconfig
ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.4.97.11  netmask 255.255.240.0  broadcast 10.4.111.255
        inet6 fe80::250:56ff:feac:77be  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:ac:77:be  txqueuelen 1000  (Ethernet)
        RX packets 77844  bytes 92294391 (88.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30947  bytes 2587734 (2.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 19  memory 0xfd4a0000-fd4c0000

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[[email protected]~]#

And as you notice its only the ens192 or eth0 is now appearing and the virbr0 is gone

 

Be the first to comment on "How to disable virbr0 Interface in Freshly Installed OS CentOS/ RedHat Linux"

Leave a comment

Your email address will not be published.