retspen / webvirtmgr

WebVirtMgr panel for manage virtual machine
http://retspen.github.io
2.04k stars 536 forks source link

The installation method & commands do not work for CentOS 7 #484

Open mkstalal opened 9 years ago

mkstalal commented 9 years ago

The steps to install webvirtmgr in CentOS 7 does not work, specially the commands & file locations for nginx installation do not work, nor the firewall configuration is clear enough for CentOS 7

aafanasyev commented 9 years ago

Please look carefully, where is nginix html or www folder. If not exist configure nginx directory properly. There you can put the webvirtmgr folder, I did also couple mistakes when I installed it on Ubuntu, but I am sure it should work.

u1735067 commented 9 years ago

Maybe not the right place to talk about this, but I don't have the time to do somethink like editing the wiki for now ; here's what I had to do to get WebVirtMgr working on a fresh CentOS 7 hypervisor flavour, using a dedicated user for webvirtmgr (and not nginx as suggested in the howto) :

[root@Equuleus ~]# cat /etc/polkit-1/rules.d/90-libvirtd.rules
polkit.addRule(function(action, subject) {
  if (action.id == "org.libvirt.unix.manage" && subject.user == "webvirtmgr") {
      return polkit.Result.YES;
  }
});

Because libvirtd control access to the local socket using polkit which require password by default, this rule allow this user to go through without password.

# setsebool httpd_can_network_connect 1

Because nginx as a proxy needs to connect to the local webvirtmgr server (or you'll get some 5xx error).

Of course you have to create an user webvirtmgr (useradd webvirtmgr -r -d /srv/http/webvirtmgr/ -l -M -U adapt it to your need) and change user=nginx to user=webvirtmgr in /etc/supervisord.conf Cleaner installation this way I think. Good luck.