The patch fixes the below problem.
==============================
If the bridge name is not mentioned in the <network> xml, the bridge name is
auto generated from virNetworkAllocateBridge(). If the default template named
bridge is created manually by a user, the bridge start will fail with
"File exists".
bash-4.3$ sudo brctl addbr virbr1
bash-4.3$ brctl show
bridge name bridge id STP enabled interfaces
br0 8000.000000000000 no
virbr0 8000.525400a91d03 yes virbr0-nic
virbr1 8000.000000000000 no
bash-4.3$ sudo virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
default active no yes
bash-4.3$ cat /tmp/isolated # Notice that the <bridge> intentionally not given.
<network>
<name>isolated</name>
<forward/>
<ip address="192.168.123.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.123.2" end="192.168.123.254"/>
</dhcp>
</ip>
</network>
bash-4.3$ sudo virsh net-create /tmp/isolated
error: Failed to create network from isolated
error: Unable to create bridge virbr1: File exists
===============================
---
Shivaprasad G Bhat (2):
cleanup conf/device_conf.h inclusion from util/virnetdev.h
network_conf: check if bridge exists on host for user created bridges
src/conf/device_conf.h | 38 +-------------------------------------
src/conf/network_conf.c | 15 ++++++++++++---
src/util/virnetdev.h | 38 +++++++++++++++++++++++++++++++++++++-
3 files changed, 50 insertions(+), 41 deletions(-)
--
Signature