解决php调用libvirt时Permission denied错误

在CentOS上编译libvirt-php,测试其examples连接另一台KVM服务器时,页面显示【Failed to connect to the hypervisor】错误。打开php的错误提示后发现警告【Warning: libvirt_connect(): unable to connect to server at '': Permission denied】。经过一番搜索,最终发现是【SELinux】启用导致,使用【nano /etc/selinux/config】,将【SELINUX=enforcing】改成【SELINUX=disabled】,关闭【SELinux】后即可正常连接KVM服务器。

posted @ 2015-03-06 18:46  流星无语  阅读(468)  评论(0编辑  收藏  举报