我删除了 Libvirt 用户,现在 virt-manager 抛出“无法连接到 libvirt qemu:///system。”

我删除了 Libvirt 用户,现在 virt-manager 抛出“无法连接到 libvirt qemu:///system。”

我知道这并不明智,只是想找到解决办法。

完整错误信息:

Unable to connect to libvirt qemu:///system.

Verify that the 'libvirtd' daemon is running.

Libvirt URI is: qemu:///system

Traceback (most recent call last):
  File "/usr/share/virt-manager/virtManager/connection.py", line 1036, in _do_open
    self._backend.open(self._do_creds_password)
  File "/usr/share/virt-manager/virtinst/connection.py", line 144, in open
    open_flags)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 104, in openAuth
    if ret is None:raise libvirtError('virConnectOpenAuth() failed')
libvirtError: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory

答案1

您需要重新配置 LibVirt 包以运行安装后脚本:

  • 对于 Ubuntu 16.04 LTS 你需要运行:

    sudo dpkg-reconfigure libvirt-bin
    
  • 对于 Ubuntu 18.04 LTS,你需要运行:

    sudo dpkg-reconfigure libvirtd-daemon-system
    

相关内容