0

I'm trying to configure foreman. So far I connected foreman to one of our KVM hosts. Specifically, this is a libvirt and we are using virsh for managing it.

When I try to create VM in foreman I'm getting the following error: 2019-08-26 12:56:48.641+0000: 23751: error : networkGetBridgeName:4007 : internal error: network 'direct' does not have a bridge name.

My network configuration looks like that:

virsh net-dumpxml --network direct
<network>
  <name>direct</name>
  <uuid>799cc56d-4c09-4963-83f6-dadb5c03bbaa</uuid>
  <forward dev='br0' mode='bridge'>
    <interface dev='br0'/>
  </forward>
</network>

Do you know what should I do with that? In foreman I'm getting the following error:

Error loading interfaces information: Internal Server Error

One more config file which can help:

cat /etc/sysconfig/network-scripts/ifcfg-br0 
# Generated by dracut initrd
DEVICE="br0"
IPV6INIT="no"
BOOTPROTO=none
ONBOOT=yes
TYPE=Bridge
USERCTL=no
NM_CONTROLLED=no
IPADDR=172.26.106.89
NETMASK=255.255.224.0
GATEWAY=172.26.96.1
NAME=br0
DEFROUTE=yes

Thank you for your help.

1

Your XML has an error in it, and because of that I have no idea how you got it into libvirt to begin with.

To define a network corresponding to an existing bridge on the host that libvirt does not manage, you need to have a <bridge> element inside the <forward> element. But your XML does not.

You should not have:

    <interface dev='br0'/>

You should instead have:

    <bridge name='br0'/>
  • Thank you. It works. Our previous config was generated from puppet and no idea why it worked properly for the past few years. – Artur Aug 27 at 7:12
  • It's possible that it actually wasn't working, and libvirt just ignored it. The network definition for a bridge not managed by libvirft is optional anyway. – Michael Hampton Aug 27 at 8:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.