Tuesday, April 7, 2020

How to delete virbr0 and virbr0-nic in RHEL7

Background

I have an RHEL 7.6 VM that I clone to have new servers. This VM was installed with the Desktop profile defaults. This installed libvirt, which I normally want in my VMs, but it sometimes gets in the way. Specifically, I needed to configure two DB2 VMs with HADR and TSAM in a test environment, and I found that virbr0 and virbr0-nic don't allow the 'db2haicu' command to successfully complete. So I needed to quickly delete those interfaces.

List of steps

As root:

service libvirtd stop
systemctl disable libvirtd
ip link set virbr0 down
brctl delbr virbr0
ip link delete virbr0-nic

Caveats

I don't know if the above will correctly survive a reboot.