我安装了virt-manager
,但无法使其工作。
我已经尝试了一些以前发布的答案但没有成功。我已经证实:
libvirt-bin
软件包安装libvirtd
守护程序已启动libvirtd
小组成员libvirt
URI 是: qemu:///system
这是我尝试运行时遇到的错误virt-manager
:
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/connection.py", line 1027, in _open_thread
self.vmm = self._try_open()
File "/usr/share/virt-manager/virtManager/connection.py", line 1009, in _try_open
flags)
File "/usr/lib/python2.7/dist-packages/libvirt.py", line 102, in openAuth
if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied
Run Code Online (Sandbox Code Playgroud)
小智 11
您可能需要注销并重新登录。
假设/etc/libvirt/libvirtd.conf
有:
# Set the UNIX domain socket group ownership. This can be used to
# allow a 'trusted' set of users access to management capabilities
# without becoming root.
#
# This is restricted to 'root' by default.
unix_sock_group = "libvirtd"
# Set the UNIX socket permissions for the R/O socket. This is used
# for monitoring VM status only
#
# Default allows any user. If setting group ownership, you may want to
# restrict this too.
unix_sock_ro_perms = "0777"
# Set the UNIX socket permissions for the R/W socket. This is used
# for full management of VMs
#
# Default allows only root. If PolicyKit is enabled on the socket,
# the default will change to allow everyone (eg, 0777)
#
# If not using PolicyKit and setting group ownership for access
# control, then you may want to relax this too.
unix_sock_rw_perms = "0770"
Run Code Online (Sandbox Code Playgroud)
如果您的用户是该libvirtd
组的成员,它应该可以工作。
检查您的用户是否应该在组中,例如 user vagrant
:
$ cat /etc/group|grep $USER
vagrant:x:1000:
libvirtd:x:116:ubuntu,vagrant
Run Code Online (Sandbox Code Playgroud)
如果您的用户不在组中,则需要添加它:
$ sudo usermod -a -G libvirtd $USER
Run Code Online (Sandbox Code Playgroud)
如果您的用户已经在 组中/etc/group
,则检查 的输出groups
:
$ groups
vagrant libvirtd
Run Code Online (Sandbox Code Playgroud)
如果您没有看到libvirtd
,则需要注销并重新登录。
小智 0
尝试将此行添加到/etc/libvirt/libvirtd.conf
listen_tls = 0
Run Code Online (Sandbox Code Playgroud)
然后lirvirt
通过以下方式重新启动:
/etc/init.d/libvirt-bin restart
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
27233 次 |
最近记录: |