-
Notifications
You must be signed in to change notification settings - Fork 1
Setup Host Server
CentOS 6.3, RedHat 6.3 and above
Fedora 18 and above
Debian Testing, Ubuntu 12.04 and above
$ curl https://git.io/fpAfx | sudo sh
or if haven't curl
$ wget -O - https://git.io/fpAfx | sudo sh
create images path and download debian jessie iso into
mkdir -p /var/www/webvirtmgr/images
wget -qO /var/www/webvirtmgr/images/debian-9.6.0-amd64-netinst.iso https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.6.0-amd64-netinst.iso
Create ssh keys for user www-data on webvirtmgr server
chown -R www-data:www-data /var/www
su -s /bin/bash www-data
ssh-keygen
cat /var/www/.ssh/id_rsa.pub
after generated keys copy the output from id_rsa.pub to your second HOST Server
/root/.ssh/authorized_keys
Open access to libvirt port
$ sudo iptables -I INPUT -m state --state NEW -m tcp -p tcp --dport 16509 -j ACCEPT
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.
$ sudo ufw allow 16509
**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 19416Setup TCP authorization OR Setup SSH authorization