Skip to content
Sling00 edited this page Jul 14, 2015 · 15 revisions

Supported Linux distributions

CentOS 6.3, RedHat 6.3 and above

Fedora 18 and above

Debian Testing, Ubuntu 12.04 and above

Setup libvirt and KVM

$ curl http://retspen.github.io/libvirt-bootstrap.sh | sudo sh
or if haven't curl
$ wget -O - http://retspen.github.io/libvirt-bootstrap.sh | sudo sh

Configuring the firewall

CentOS 6, Fedora 18, RedHat EL6

Open access to libvirt port

$ sudo iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 16509 -j ACCEPT

CentOS 7, Fedora 19+, RedHat EL7 (and other distributions utilizing firewalld)

Find your firewalld zones:

$ sudo firewall-cmd --get-active-zones

The zone for the interface which connects the libvirt host and the webvirtmgr host is in the public zone by default, so the command is:

$ sudo firewall-cmd --zone=public --add-port 16509/tcp --permanent
$ sudo firewall-cmd --reload

Otherwise substitute --zone=public in the above for the correct zone.

Ubuntu

$ sudo ufw allow 16509

Common Problems

Ubuntu

**Problem #1: **Libvirt-bin won't start

Verify that libvirt-bin won't start

$ sudo service libvirt-bin start
        libvirt-bin start/running, process 19416
$ sudo service libvirt-bin status
        libvirt-bin stop/waiting

If after starting libvirt is still in stop/waiting check the log

$ sudo tail /var/log/libvirt/libvirtd.log
       2014-02-14 20:11:46.989+0000: 18902: info : libvirt version: 0.9.8
       2014-02-14 20:11:46.989+0000: 18902: error : virNetServerMDNSStart:460 : internal error Failed to create mDNS client: Daemon not running

If you see a virNetServerMDNSStart error it means you don't have dBus installed

$ apt-get install dbus -q

Libvirt-bin should now start!

$ sudo service libvirt-bin start
        libvirt-bin start/running, process 19416
$ sudo service libvirt-bin status
        libvirt-bin start/running, process 19416

Setup authorization

Setup TCP authorization OR Setup SSH authorization