libvirt network config on alpine: 'firewall backend' error

3 posts / 0 new
Last post
#1 Fri, 2016-02-26 00:39
kzauser420
  • kzauser420's picture
  • Offline
  • Last seen: 4 months 6 days ago
  • Joined: 2016-01-30

Hi - highly appreciate any help/pointers to resolve the issue:

I'm trying to setup network using libvirt (verion 1.2.21) on a dom0 Alpine-xen v3.3.1 running Xen (4.6.0)

(*) have dnsmasq, dbus, ebtables and iptables installed.
(*) service dbus start

(*) I'm using the sample 'default' network config: cat libvirt_default_network.xml

<network>
  <name>default</name>
  <bridge name="virbr0"/>
  <forward/>
  <ip address="192.168.122.1" netmask="255.255.255.0">
    <dhcp>
      <range start="192.168.122.2" end="192.168.122.254"/>
    </dhcp>
  </ip>
</network>

(*) virsh net-create libvirt_default_network.xml
(*) I get the following error message (on the console as well as in the /var/log/libvirt/libvritd.log file)
error: Failed to create network from libvirt_default_network.xml
error: internal error: Failed to initialize a valid firewall backend

How to I go about setting up networks under libvirt? Alpine does not have firewalld package (apk search firewalld gives zlich).

Also, here's the list of libvirt packages installed in the dom0 alpine:
~# apk info | grep -i 'virt'
libvirt
libvirt-client
libvirt-daemon
libvirt-common-drivers
libvirt-xen

Fri, 2016-02-26 12:43
kzauser420
  • kzauser420's picture
  • Offline
  • Last seen: 4 months 6 days ago
  • Joined: 2016-01-30

Solved this for myself ...was being a bit silly....

(A) added dbus to start during boot (not directly related to resolution - but useful): rc-update add dbus

(B) apk add libvirt-all remaining packages include dev

(C) restart libvirtd: /etc/init.d/libvirtd restart.

and then running the virsh net-create file.xml command actually gave an error ... coz the network has been created and was running !!!! huh!!

virsh net-list:
Name State Autostart Persistent
----------------------------------------------------------
default active yes yes

Wed, 2016-06-22 11:13
Ianux
  • Ianux's picture
  • Offline
  • Last seen: 7 months 2 weeks ago
  • Joined: 2016-06-05

I did on a fresh system only:
apk add libvirt-qemu dnsmasq ebtables ip6tables
modprobe tun
service libvirtd start
this starts the bridge virbr0 and the 'default' network, see virsh net-list --all
So, I think this is a bug, because dnsmasq ebtables ip6tables don't get auto-installed, and module tun not loaded.
I created an issue http://bugs.alpinelinux.org/issues/5769

Log in or register to post comments