[libvirt] Network Interface: How to disable virbr0 correctly?

Matthias Bolte matthias.bolte at googlemail.com
Tue Mar 8 19:13:33 UTC 2011


2011/3/7 Jake Xu <jake at demonwaremail.net>:
> Hi all,
> Recently, I have been using libvirt to create virtual machines on ESX
> servers. It has been very well until to the point where I couldn't find any
> way to disable/remove the virbr0 interface properly.

virbr0 is part of libvirt default virtual network. This is created by
the libvirt daemon libvirtd. You don't need libvirtd to connect to an
and ESX server. Just don't start it, and if you have it running just
stop it and the virbr0 interface go away with it.

If you need or want to run libvirtd for some reason you can use this

virsh -c qemu:///system net-autostart --disable default
virsh -c qemu:///system net-destroy default

This will stop the default virtual network and disable it's autostart.
The result is that virbr0 will go away.

> We use static configuration for VMs on ESX so we do not need to use virbr0
> interface and we do not want libvirt to configure iptables as a result of
> the newly created virbr0 interface.

The iptables rules will go away with the virbr0 interface.

> I have tried to remove/rename the /etc/libvirt/qemu/networks/autostart.xml
> file, and that prevents virbr0 being installed.
> However, that also seems to prevent the second interface eth1 being
> configured properly. After libvirt defines a VM, eth0 and eht1 are both
> installed, but only eth0 is configured properly.
> The eth1 does not appear in the /etc/sysconfig/network-script/ifcfg-xxx
> file. It seems to me that the 'autostart.xml' file interrupts the
> configuration of the eth1 interface.

I don't understand this point. Are eth0 and eth1 inside of your VMs or
are you referring to the interfaces of your management client?

Matthias




More information about the libvir-list mailing list